Permalink
Browse files

User Model#last to certainly get lastly created data

This test would fail when executed after any test that calls fixtures(:binaries)
  • Loading branch information...
1 parent b23365f commit bd7b4f76589ad9ab016aea3442f7ceef6251cced @amatsuda amatsuda committed Aug 28, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/test/cases/dirty_test.rb
View
2 activerecord/test/cases/dirty_test.rb
@@ -689,7 +689,7 @@ def type_cast_for_database(value)
end
klass.create!(data: "foo")
- binary = klass.first
+ binary = klass.last
assert_not binary.changed?

0 comments on commit bd7b4f7

Please sign in to comment.