spec/percy/cli/snapshot_spec.rb in percy-cli-1.2.3 vs spec/percy/cli/snapshot_spec.rb in percy-cli-1.2.4
- old
+ new
@@ -39,9 +39,16 @@
raise Percy::Client::ConnectionFailed
end
expect(result).to eq(nil)
expect(cli.send(:failed?)).to eq(true)
end
+ it 'makes block safe from UnauthorizedError' do
+ result = cli.send(:rescue_connection_failures) do
+ raise Percy::Client::UnauthorizedError.new(401, 'GET', '', '')
+ end
+ expect(result).to eq(nil)
+ expect(cli.send(:failed?)).to eq(true)
+ end
it 'makes block safe from TimeoutError' do
result = cli.send(:rescue_connection_failures) do
raise Percy::Client::TimeoutError
end
expect(result).to eq(nil)