4 class UserBlocksControllerTest < ActionDispatch::IntegrationTest
7 { :path => "/api/0.6/user_blocks/1", :method => :get },
8 { :controller => "api/user_blocks", :action => "show", :id => "1" }
13 block = create(:user_block)
15 get api_user_block_path(:id => block)
16 assert_response :success
17 assert_select "user_block[id='#{block.id}']", 1
20 def test_show_not_found
21 get api_user_block_path(:id => 123)
22 assert_response :not_found
23 assert_equal "text/plain", @response.media_type