Sha256: 90552f7586dd9ce083f0d29abfd694ff07f78c2867f227a981d2f28a56c1406d
Contents?: true
Size: 541 Bytes
Versions: 2
Compression:
Stored size: 541 Bytes
Contents
require 'test_helper' class RaiseJs::JavascriptErrorsControllerTest < ActionController::TestCase test "create raises a JavscriptException" do assert_raises RaiseJs::JavascriptError do begin post :create, msg: "Error!", url: "http://example.org", line: "42" rescue RaiseJs::JavascriptError => e assert_equal "Error!", e.msg assert_equal "http://example.org", e.url assert_equal "42", e.line raise # raise again in order to catch it in the assertion end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
raise_js-0.0.2 | test/controllers/raise_js/javascript_errors_controller_test.rb |
raise_js-0.0.1 | test/controllers/raise_js/javascript_errors_controller_test.rb |