Sha256: eb508b73620b38a8d24a0858a74b82b8905da8a013725f137756e0b547ae3791
Contents?: true
Size: 492 Bytes
Versions: 9
Compression:
Stored size: 492 Bytes
Contents
require 'test_helper' class ImagesControllerTest < ActionController::TestCase setup do @image = images(:image_one) @controller.current_admin = users(:bob) end test 'get show with correct id parameter' do get :show, params: { id: @image.token }, format: :json assert_response :success end test 'get show with incorrect id parameter' do assert_raises ActiveRecord::RecordNotFound do get :show, params: { id: @image.id }, format: :json end end end
Version data entries
9 entries across 9 versions & 1 rubygems