Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-05-31 12:20:36 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-05-31 12:20:36 +0300
commitfb1b7b00f3f76e0c0ace91b5dfea63408c24de08 (patch)
tree88cda26835746907dce5baa160871dbdc4bc36dd /spec
parente3cb71442e96921ae67a443a62d8f27f6df02216 (diff)
Fix environment model specs related to protected actions
Diffstat (limited to 'spec')
-rw-r--r--spec/models/environment_spec.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/spec/models/environment_spec.rb b/spec/models/environment_spec.rb
index 12519de8636..9fbe19b04d5 100644
--- a/spec/models/environment_spec.rb
+++ b/spec/models/environment_spec.rb
@@ -227,7 +227,10 @@ describe Environment, models: true do
context 'when user is allowed to stop environment' do
before do
- project.add_master(user)
+ project.add_developer(user)
+
+ create(:protected_branch, :developers_can_merge,
+ name: 'master', project: project)
end
context 'when action did not yet finish' do