diff options
author | Timothy Andrew <mail@timothyandrew.net> | 2016-08-16 11:40:28 +0300 |
---|---|---|
committer | Timothy Andrew <mail@timothyandrew.net> | 2016-08-16 11:40:28 +0300 |
commit | 0e2cecfd628f00e19c33d84f76e2859ebf8a073e (patch) | |
tree | 2eb2bfffbb6a0d69c562244cc705a21bad611243 | |
parent | dd3b738d5b3eb70217d7ac7f9fe441498d2e8e7e (diff) |
Fix API::BranchesSpec.
- Previously created a protected branch manually, without using a
factory.
-rw-r--r-- | spec/requests/api/branches_spec.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/requests/api/branches_spec.rb b/spec/requests/api/branches_spec.rb index 9444138f93d..3fd989dd7a6 100644 --- a/spec/requests/api/branches_spec.rb +++ b/spec/requests/api/branches_spec.rb @@ -243,7 +243,7 @@ describe API::API, api: true do end it "removes protected branch" do - project.protected_branches.create(name: branch_name) + create(:protected_branch, project: project, name: branch_name) delete api("/projects/#{project.id}/repository/branches/#{branch_name}", user) expect(response).to have_http_status(405) expect(json_response['message']).to eq('Protected branch cant be removed') |