Commit c927bc3f authored by Douwe Maan's avatar Douwe Maan

Fix specs

parent faa2e2df
......@@ -407,7 +407,6 @@ describe Repository, models: true do
context "when an author is specified" do
it "uses the given email/name to set the commit's author" do
expect do
repository.update_file(user, 'README', 'Updated README!',
branch_name: 'master',
......
......@@ -127,7 +127,7 @@ describe API::Files, api: true do
end
it "returns a 400 if editor fails to create file" do
allow_any_instance_of(Repository).to receive(:commit_file).
allow_any_instance_of(Repository).to receive(:create_file).
and_return(false)
post api("/projects/#{project.id}/repository/files", user), valid_params
......@@ -215,7 +215,7 @@ describe API::Files, api: true do
end
it "returns a 400 if fails to create file" do
allow_any_instance_of(Repository).to receive(:remove_file).and_return(false)
allow_any_instance_of(Repository).to receive(:delete_file).and_return(false)
delete api("/projects/#{project.id}/repository/files", user), valid_params
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment