Fix build entity specs related to protected actions
This commit is contained in:
parent
16368e6551
commit
0f52544bad
1 changed files with 5 additions and 1 deletions
|
@ -3,6 +3,7 @@ require 'spec_helper'
|
||||||
describe BuildEntity do
|
describe BuildEntity do
|
||||||
let(:user) { create(:user) }
|
let(:user) { create(:user) }
|
||||||
let(:build) { create(:ci_build) }
|
let(:build) { create(:ci_build) }
|
||||||
|
let(:project) { build.project }
|
||||||
let(:request) { double('request') }
|
let(:request) { double('request') }
|
||||||
|
|
||||||
before do
|
before do
|
||||||
|
@ -52,7 +53,10 @@ describe BuildEntity do
|
||||||
|
|
||||||
context 'when user is allowed to trigger action' do
|
context 'when user is allowed to trigger action' do
|
||||||
before do
|
before do
|
||||||
build.project.add_master(user)
|
project.add_developer(user)
|
||||||
|
|
||||||
|
create(:protected_branch, :developers_can_merge,
|
||||||
|
name: 'master', project: project)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'contains path to play action' do
|
it 'contains path to play action' do
|
||||||
|
|
Loading…
Reference in a new issue