Skip to content

Commit

Permalink
Rubocop fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
timjnh committed Mar 7, 2024
1 parent 4a5379e commit 441cc0e
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions spec/integration/params/predicates/uri_spec.rb
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
RSpec.describe 'Predicates: uri?' do
# frozen_string_literal: true

RSpec.describe "Predicates: uri?" do
subject(:schema) do
Dry::Schema.Params do
required(:uri) { str? & uri?(:https) }
end
end

it 'passes with valid input' do
it "passes with valid input" do
expect(schema.(uri: "https://www.example.com")).to be_success
end

it 'fails with invalid input' do
expect(schema.(uri: 'not-a-uri').errors.to_h).to eql(uri: ['is not a valid URI'])
it "fails with invalid input" do
expect(schema.(uri: "not-a-uri").errors.to_h).to eql(uri: ["is not a valid URI"])
end
end
end

0 comments on commit 441cc0e

Please sign in to comment.