Permalink
Browse files

[ci skip] add tests for ActionModel::Conversion

  • Loading branch information...
1 parent b6d3fa1 commit 23992077894d68aaa5ba910c589bd87b3f05248c @aditya-kapoor aditya-kapoor committed Jun 11, 2014
Showing with 4 additions and 0 deletions.
  1. +4 −0 activemodel/test/cases/conversion_test.rb
@@ -24,6 +24,10 @@ class ConversionTest < ActiveModel::TestCase
assert_equal "1", Contact.new(id: 1).to_param
end
+ test "to_param returns the string joined by '-'" do
+ assert_equal "abc-xyz", Contact.new(id: ["abc", "xyz"]).to_param
+ end
+
test "to_param returns nil if to_key is nil" do
klass = Class.new(Contact) do
def persisted?

0 comments on commit 2399207

Please sign in to comment.