提交 f80d7a86 编写于 作者: G Grzegorz Bizon

Update build model specs

上级 94cf7590
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册