Skip to content

Commit

Permalink
Spec fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Morgan committed May 31, 2017
1 parent 0f64b87 commit 9c602ff
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions spec/url_validator_spec.rb
Expand Up @@ -61,10 +61,9 @@ class Record
http/sdg.d
http:://dsfg.dsfg/
http//sdg..g
http://://sdfg.f
http://dsaf.com://sdg.com).each do |uri|
http://://sdfg.f).each do |uri|
@record.errors.clear
@validator.validate_each(@record, :field, 'www.apple.com')
@validator.validate_each(@record, :field, uri)
expect(@record.errors[:field].first).to include('invalid_url')
end
end
Expand Down Expand Up @@ -220,7 +219,7 @@ class Record

context '[:request_callback]' do
it "should be yielded the HTTPI request" do
called = false
called = false
@validator = UrlValidator.new(attributes: %i(field), check_host: true, request_callback: ->(request) { called = true; expect(request).to be_kind_of(HTTPI::Request) })
@validator.validate_each(@record, :field, 'http://www.google.com/sdgsdgf')
expect(called).to eql(true)
Expand Down

0 comments on commit 9c602ff

Please sign in to comment.