diff options
Diffstat (limited to 'spec/serializers/build_entity_spec.rb')
-rw-r--r-- | spec/serializers/build_entity_spec.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/spec/serializers/build_entity_spec.rb b/spec/serializers/build_entity_spec.rb index b5eb84ae43b..46d43a80ef7 100644 --- a/spec/serializers/build_entity_spec.rb +++ b/spec/serializers/build_entity_spec.rb @@ -2,7 +2,8 @@ require 'spec_helper' describe BuildEntity do let(:user) { create(:user) } - let(:build) { create(:ci_build) } + let(:build) { create(:ci_build, :failed) } + let(:project) { build.project } let(:request) { double('request') } before do @@ -17,6 +18,7 @@ describe BuildEntity do it 'contains paths to build page and retry action' do expect(subject).to include(:build_path, :retry_path) + expect(subject[:retry_path]).not_to be_nil end it 'does not contain sensitive information' do @@ -52,7 +54,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 |