Skip to content
Snippets Groups Projects
Commit c927bc3f authored by Douwe Maan's avatar Douwe Maan
Browse files

Fix specs

parent faa2e2df
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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',
Loading
Loading
Loading
Loading
@@ -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
Loading
Loading
@@ -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
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment