BigW Consortium Gitlab

Commit c1399cbc by Robert Speicher

Merge branch 'rs-fix-spec-warnings' into 'master'

Ensure raise_error expectations provide arguments See merge request !1381
parents ba71542a 2f884592
......@@ -38,7 +38,8 @@ describe Ci::Variable do
it 'fails to decrypt if iv is incorrect' do
subject.encrypted_value_iv = nil
subject.instance_variable_set(:@value, nil)
expect { subject.value }.to raise_error
expect { subject.value }.
to raise_error(OpenSSL::Cipher::CipherError, 'bad decrypt')
end
end
end
......@@ -56,7 +56,8 @@ describe Ci::WebHook do
it "catches exceptions" do
expect(Ci::WebHook).to receive(:post).and_raise("Some HTTP Post error")
expect{ @web_hook.execute(@data) }.to raise_error
expect{ @web_hook.execute(@data) }.
to raise_error(RuntimeError, 'Some HTTP Post error')
end
end
end
......@@ -165,7 +165,8 @@ describe Ci::API::API do
project.gl_project.team << [user, :master]
delete ci_api("/projects/#{project.id}"), options
expect(response.status).to eq(200)
expect { project.reload }.to raise_error
expect { project.reload }.
to raise_error(ActiveRecord::RecordNotFound)
end
it "non-manager is not authorized" do
......
......@@ -15,7 +15,8 @@ describe Ci::CreateProjectService do
context 'without project dump' do
it 'should raise exception' do
expect { service.execute(current_user, '', '') }.to raise_error
expect { service.execute(current_user, '', '') }.
to raise_error(NoMethodError)
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment