Fix build entity specs related to protected actions

This commit is contained in:
Grzegorz Bizon 2017-05-31 10:37:19 +02:00
parent 16368e6551
commit 0f52544bad

View file

@ -3,6 +3,7 @@ require 'spec_helper'
describe BuildEntity do
let(:user) { create(:user) }
let(:build) { create(:ci_build) }
let(:project) { build.project }
let(:request) { double('request') }
before do
@ -52,7 +53,10 @@ describe BuildEntity do
context 'when user is allowed to trigger action' do
before do
build.project.add_master(user)
project.add_developer(user)
create(:protected_branch, :developers_can_merge,
name: 'master', project: project)
end
it 'contains path to play action' do