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
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-01-11 13:18:21 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-01-14 14:48:16 +0300
commitf80d7a868e83f7cbba2d0c42ed9464552d9c7a0b (patch)
tree4f6d98626cc9516a4f1b9700e7983cf347bb7e61
parent94cf75900181f1d73840f4306ee1a1a157800744 (diff)
Update build model specs
-rw-r--r--spec/models/build_spec.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/spec/models/build_spec.rb b/spec/models/build_spec.rb
index ca96e827e04..0e13456723d 100644
--- a/spec/models/build_spec.rb
+++ b/spec/models/build_spec.rb
@@ -361,14 +361,13 @@ describe Ci::Build, models: true do
describe :artifacts_browse_url do
subject { build.artifacts_browse_url }
- it "should be nil if artifact doesn't exist" do
- build.update_attributes(artifacts_file: nil)
+ it "should be nil if artifacts browser is unsupported" do
+ allow(build).to receive(:artifacts_browser_supported?).and_return(false)
is_expected.to be_nil
end
- it 'should not be nil if artifact exist' do
- gif = fixture_file_upload(Rails.root + 'spec/fixtures/banana_sample.gif', 'image/gif')
- build.update_attributes(artifacts_file: gif)
+ it 'should not be nil if artifacts browser is supported' do
+ allow(build).to receive(:artifacts_browser_supported?).and_return(true)
is_expected.to_not be_nil
end
end