Closed ConfusedVorlon closed 2 years ago
never mind - rewriting the test as
expect {
foo.destroy
}.to change{bar.reload.updated_at}
makes it pass, so I guess the data is actually getting updated as required. Just a testing quirk...
No worries :) Glad you worked it out :) You'd definitely need to reload the record to see the change.
wierdly you don't need to reload if you're not using acts_as_list. that's what threw me; I tested a non-list-model like this first and it passed...
I guess something about the work acts_as_list is doing in the destroy callback...
Yea that's strange. Not sure what could be causing it :) Feel free to investigate it further if you think it's worth your time :D
the test fails if Foo is acts_as_list if you remove acts_as_list from Foo, then the test passes (as expected)
Thanks for a great gem :)