Skip to content

Commit

Permalink
Merge pull request #815 from samvera/fix_warn_coverage
Browse files Browse the repository at this point in the history
Don't actually set config for ID equality.
  • Loading branch information
tpendragon authored Jan 9, 2020
2 parents 1a6d62a + 7dea70f commit 79d6d5e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions lib/valkyrie/id.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,8 @@ def default_equality(other)
output = (other.class == self.class && other.state == state)
return output if output == true
if output == false && string_equality(other) && Valkyrie.config.id_string_equality.nil?
# :nocov:
warn "[DEPRECATION] Valkyrie::IDs will always be equal to their string counterparts in 3.0.0. " \
"To silence this message, please either compare IDs or set Valkyrie.config.id_string_equality = true."
# :nocov:
end
false
end
Expand Down
2 changes: 1 addition & 1 deletion spec/valkyrie/types_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class Resource < Valkyrie::Resource
end

it "doesn't echo a deprecated message if configured" do
Valkyrie.config.id_string_equality = false
allow(Valkyrie.config).to receive(:id_string_equality).and_return(false)
expect do
expect(resource.thumbnail_id).not_to eq '123'
end.not_to output(message).to_stderr
Expand Down

0 comments on commit 79d6d5e

Please sign in to comment.