test/slug_history_test.rb in pseudocephalopod-0.2.1 vs test/slug_history_test.rb in pseudocephalopod-0.2.2

- old
+ new

@@ -68,10 +68,19 @@ assert_same_as_slug user, "red" assert_different_to_slug user, "bob" assert_none_for_slug "bob" end + should 'remove slug history for a record by default on destroy' do + setup_slugs! + user = User.create :name => "Bob" + user.update_attributes! :name => "Sal" + user.update_attributes! :name => "Red" + user.update_attributes! :name => "Jim" + assert_equal ["red", "sal", "bob"], user.previous_slugs + user.destroy + assert_equal [], user.previous_slugs + end + end - end - end \ No newline at end of file