Commit aa343d54 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'blackst0ne-improve-encoding-helper-spec' into 'master'

Update specs to exclude possible false positive pass

Closes #55403

See merge request gitlab-org/gitlab-ce!23893
parents 651d1264 236876f2
---
title: Update specs to exclude possible false positive pass
merge_request: 23893
author: "@blackst0ne"
type: other
...@@ -124,7 +124,7 @@ describe Gitlab::EncodingHelper do ...@@ -124,7 +124,7 @@ describe Gitlab::EncodingHelper do
end end
it 'returns empty string on conversion errors' do it 'returns empty string on conversion errors' do
expect { ext_class.encode_utf8('') }.not_to raise_error(ArgumentError) expect { ext_class.encode_utf8('') }.not_to raise_error
end end
context 'with strings that can be forcefully encoded into utf8' do context 'with strings that can be forcefully encoded into utf8' do
......
...@@ -137,7 +137,7 @@ describe Gitlab::Gpg do ...@@ -137,7 +137,7 @@ describe Gitlab::Gpg do
described_class.using_tmp_keychain do described_class.using_tmp_keychain do
end end
end end
end.not_to raise_error(ThreadError) end.not_to raise_error
end end
end end
end end
......
...@@ -43,7 +43,7 @@ shared_examples 'ChronicDurationAttribute writer' do ...@@ -43,7 +43,7 @@ shared_examples 'ChronicDurationAttribute writer' do
end end
it "doesn't raise exception" do it "doesn't raise exception" do
expect { subject.send("#{virtual_field}=", '-10m') }.not_to raise_error(ChronicDuration::DurationParseError) expect { subject.send("#{virtual_field}=", '-10m') }.not_to raise_error
end end
it "doesn't change value" do it "doesn't change value" do
...@@ -87,7 +87,7 @@ shared_examples 'ChronicDurationAttribute writer' do ...@@ -87,7 +87,7 @@ shared_examples 'ChronicDurationAttribute writer' do
end end
it "doesn't raise exception" do it "doesn't raise exception" do
expect { subject.send("#{virtual_field}=", nil) }.not_to raise_error(NoMethodError) expect { subject.send("#{virtual_field}=", nil) }.not_to raise_error
end end
end end
end end
......
...@@ -1358,7 +1358,7 @@ describe MergeRequest do ...@@ -1358,7 +1358,7 @@ describe MergeRequest do
it 'does not raises a NameError exception' do it 'does not raises a NameError exception' do
allow_any_instance_of(service_class_name.constantize).to receive(:execute).and_return(nil) allow_any_instance_of(service_class_name.constantize).to receive(:execute).and_return(nil)
expect { subject }.not_to raise_error(NameError) expect { subject }.not_to raise_error
end end
end end
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