class UpdateableViewTest
Public Instance Methods
test_insert_record()
click to toggle source
# File activerecord/test/cases/view_test.rb, line 190 def test_insert_record PrintedBook.create! name: "Quails in Action", status: 0, format: "paperback" new_book = PrintedBook.last assert_equal "Quails in Action", new_book.name end
test_update_record()
click to toggle source
# File activerecord/test/cases/view_test.rb, line 182 def test_update_record book = PrintedBook.first book.name = "AWDwR" book.save! book.reload assert_equal "AWDwR", book.name end
test_update_record_to_fail_view_conditions()
click to toggle source
# File activerecord/test/cases/view_test.rb, line 197 def test_update_record_to_fail_view_conditions book = PrintedBook.first book.format = "ebook" book.save! assert_raises ActiveRecord::RecordNotFound do book.reload end end