summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-07-20 11:42:13 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-07-20 11:42:13 +0200
commit70489d08b7e8b4bd0ba566da2ed0e417bef3ed3e (patch)
tree6f4263f2ca506af002d045aefb2708e33c86718c
parentc9749e22383661c0772addfcf4274ec3a81bd229 (diff)
downloadgitlab-ce-70489d08b7e8b4bd0ba566da2ed0e417bef3ed3e.tar.gz
Fix invalid assertions in build details entity specs
-rw-r--r--spec/factories/ci/builds.rb1
-rw-r--r--spec/serializers/build_details_entity_spec.rb10
2 files changed, 5 insertions, 6 deletions
diff --git a/spec/factories/ci/builds.rb b/spec/factories/ci/builds.rb
index 863c82ece6a..a77f01ecb00 100644
--- a/spec/factories/ci/builds.rb
+++ b/spec/factories/ci/builds.rb
@@ -140,7 +140,6 @@ FactoryGirl.define do
end
trait :erased do
- erasable
erased_at Time.now
erased_by factory: :user
end
diff --git a/spec/serializers/build_details_entity_spec.rb b/spec/serializers/build_details_entity_spec.rb
index 2c981154f0d..446a2451956 100644
--- a/spec/serializers/build_details_entity_spec.rb
+++ b/spec/serializers/build_details_entity_spec.rb
@@ -87,18 +87,18 @@ describe BuildDetailsEntity do
end
end
- context 'when the build has been erased' do
- let(:build) { create(:ci_build, :erased, project: project) }
+ context 'when the build has not been erased' do
+ let(:build) { create(:ci_build, :erasable, project: project) }
- it 'exposes the user whom erased the build' do
+ it 'exposes a build erase path' do
expect(subject).to include(:erase_path)
end
end
context 'when the build has been erased' do
- let(:build) { create(:ci_build, :erased, project: project, erased_by: user) }
+ let(:build) { create(:ci_build, :erased, project: project) }
- it 'exposes the user whom erased the build' do
+ it 'exposes the user who erased the build' do
expect(subject).to include(:erased_by)
end
end