Skip to content

Commit

Permalink
Don't rely on specific translations
Browse files Browse the repository at this point in the history
  • Loading branch information
cavis committed Jan 17, 2025
1 parent 55edaf5 commit a5fbfc5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/models/validators/redirect_prefix_validator_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

feed.enclosure_prefix = one.sub("/dovetail.prxu.org/zero.mp3", "")
assert feed.invalid?
assert_includes feed.errors[:enclosure_prefix], "prefix not reachable"
assert feed.errors.added?(:enclosure_prefix, :unreachable)
end

it "validates duplicate https" do
Expand All @@ -55,7 +55,7 @@

feed.enclosure_prefix = one.sub("/dovetail.prxu.org/zero.mp3", "")
assert feed.invalid?
assert_includes feed.errors[:enclosure_prefix], "prefix not reachable"
assert feed.errors.added?(:enclosure_prefix, :unreachable)

WebMock.disable_net_connect!
end
Expand All @@ -69,7 +69,7 @@

feed.enclosure_prefix = one.sub("/dovetail.prxu.org/zero.mp3", "")
assert feed.invalid?
assert_includes feed.errors[:enclosure_prefix], "prefix not reachable"
assert feed.errors.added?(:enclosure_prefix, :unreachable)
end

it "validates too many redirects" do
Expand All @@ -87,7 +87,7 @@
feed.enclosure_prefix = one.sub("/dovetail.prxu.org/zero.mp3", "")
validator = RedirectPrefixValidator.new(attributes: [:enclosure_prefix], max_jumps: 2)
validator.validate(feed)
assert_includes feed.errors[:enclosure_prefix], "too many redirects"
assert feed.errors.added?(:enclosure_prefix, :too_many_redirects)
assert_requested(r1)
assert_requested(r2)
assert_requested(r3)
Expand Down

0 comments on commit a5fbfc5

Please sign in to comment.