Sha256: e6e8378072212cb6b332ee4fee8c9e5c335c21bb6d2bf9fe4cb4e9b87d2d3596
Contents?: true
Size: 641 Bytes
Versions: 10
Compression:
Stored size: 641 Bytes
Contents
require 'test_helper' class ImagesControllerTest < ActionController::TestCase def setup @image = images :one end context "with user as parent" do context "on post to :create" do setup do post :create, :user_id => 1, :photo => {} end should redirect_to("user image page") { user_image_path(@image.user) } should assign_to :image should assign_to :user should "scope image to user" do assert users(:one), assigns(:image).user end end end should "not respond to show" do assert_raise(ActionController::UnknownAction) do get :show end end end
Version data entries
10 entries across 10 versions & 3 rubygems