Sha256: a8c72327d5ba1434c14099c95d39f594fff2539df59c2344e08c0e9460a90b3e
Contents?: true
Size: 568 Bytes
Versions: 3
Compression:
Stored size: 568 Bytes
Contents
require 'test_helper' class DismissibleBlocksControllerTest < ActionController::TestCase test "dismiss block via ajax" do session[:username] = users(:one).username # Login refute users(:one).dismissed_blocks.include?('lorem') xhr :post, :create, block: 'lorem', format: 'json' users(:one).reload assert users(:one).dismissed_blocks.include?('lorem') assert_response :ok end test "dismiss block fails via ajax; not logged in" do xhr :post, :create, block: 'lorem', format: 'json' assert_response :unprocessable_entity end end
Version data entries
3 entries across 3 versions & 1 rubygems