Created
December 3, 2011 17:15
-
-
Save pnegri/1427605 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
it "should be readonly after find if locked equals true" do | |
@log = Fabricate(:invoice_log_locked) | |
lambda { | |
@locked_log = InvoiceLog.where(:locked => true).first() | |
@locked_log->description = "Changing the Description" | |
@locked_log->save() | |
}.should raise_error(ActiveRecord::ReadOnlyRecord) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment