Created
October 22, 2015 14:34
-
-
Save benoittgt/22a0f4528a004f18eed4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I have this code: | |
def destroy | |
old_store = mobile_application.store | |
users_ids = [1,2] | |
super | |
UpdateLastUpdatesWorker.perform_async old_store.id, users_ids | |
mobile_application.last_update = mobile_application.old_last_update | |
mobile_application.save! | |
end | |
# tests pass | |
def destroy | |
old_store = mobile_application.store | |
super | |
UpdateLastUpdatesWorker.perform_async old_store.id | |
mobile_application.last_update = mobile_application.old_last_update | |
mobile_application.save! | |
end | |
# tests fails with "Failed to destroy the record" | |
# If we edit the worker line with : | |
UpdateLastUpdatesWorker.perform_async old_store.id # fail ! | |
UpdateLastUpdatesWorker.perform_async old_store.id, [] # Tests pass ! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment