@ -53,9 +53,9 @@ describe SecureContextUriValidator do
describe " when URI is ' #{ uri } ' " do
let ( :host ) { uri }
it " adds an :could_not_parse_host_uri error " do
it " adds an :invalid_url error " do
expect ( model_instance . errors ) . to include ( :host )
expect ( model_instance . errors . first . type ) . to be :could_not_parse_host_uri
expect ( model_instance . errors . first . type ) . to be :invalid_url
end
end
end
@ -66,9 +66,9 @@ describe SecureContextUriValidator do
describe " when URI is ' #{ uri } ' " do
let ( :host ) { uri }
it " adds an :could_not_parse_host_uri error " do
it " adds an :invalid_url error " do
expect ( model_instance . errors ) . to include ( :host )
expect ( model_instance . errors . first . type ) . to be :could_not_parse_host_uri
expect ( model_instance . errors . first . type ) . to be :invalid_url
end
end
end
@ -78,9 +78,9 @@ describe SecureContextUriValidator do
context 'when host is missing' do
let ( :host ) { 'https://' }
it " adds an :could_not_parse_host_uri error " do
it " adds an :invalid_url error " do
expect ( model_instance . errors ) . to include ( :host )
expect ( model_instance . errors . first . type ) . to be :could_not_parse_host_uri
expect ( model_instance . errors . first . type ) . to be :invalid_url
end
end
@ -89,9 +89,9 @@ describe SecureContextUriValidator do
describe " when URI is ' #{ uri } ' " do
let ( :host ) { uri }
it " adds a :uri _not_secure_context error " do
it " adds a :url _not_secure_context error " do
expect ( model_instance . errors ) . to include ( :host )
expect ( model_instance . errors . first . type ) . to be :uri _not_secure_context
expect ( model_instance . errors . first . type ) . to be :url _not_secure_context
end
end
end