Skip to content

Commit

Permalink
Example of to_params not generating expected data.
Browse files Browse the repository at this point in the history
Details in issue norman#959

in older versions this would return the slug.
  • Loading branch information
sbeckeriv authored Dec 2, 2020
1 parent 4e45e4c commit e9decfa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/slugged_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ class Journalist < ActiveRecord::Base
journalist = Journalist.new :name => 'Clark Kent', :active => true
assert journalist.save
journalist.name = 'Superman'
journalist.slug = nil
journalist.slug = 'no-so-superman'
journalist.active = nil
refute journalist.save
assert_equal 'superman', journalist.to_param
Expand All @@ -543,7 +543,7 @@ class Journalist < ActiveRecord::Base
journalist = Journalist.new :name => 'Clark Kent', :active => true
assert journalist.save
journalist.name = 'x'
journalist.slug = nil
journalist.slug = 'tots-not-clark-kent'
journalist.active = nil
refute journalist.save
assert_equal 'clark-kent', journalist.to_param
Expand Down

0 comments on commit e9decfa

Please sign in to comment.