noosfero | Improvements on template mirror blocks behaviour (#763)
Rodrigo Souto
gitlab at mg.gitlab.com
Mon Jan 18 10:21:04 BRST 2016
New comment for Merge Request 763
https://gitlab.com/noosfero/noosfero/merge_requests/763#note_3272505
Rodrigo Souto
I'd prefer if you test the destruction of the block explicitly. Testing only the count difference may hide bugs (it might be destroying other block instead of the right one). So do something like (pseudo-code):
```
template_block = Block.create ...
mirror_block = Block.create ...
template_block.observers << mirror_block
template_block.destroy!
assert_nil template_block.reload # When you reload an object that was destroyed it returns nil
```
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20160118/3f48f24a/attachment.html>
More information about the Noosfero-dev
mailing list