Sha256: d8ee6caca250617af0ae6560464f7b328fc8f24d0cb5707adc60a79d6b4da0e6

Contents?: true

Size: 661 Bytes

Versions: 14

Compression:

Stored size: 661 Bytes

Contents

require File.dirname(__FILE__) + '/../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_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

14 entries across 14 versions & 5 rubygems

Version Path
viva-resource_controller-0.6.5.1 test/test/functional/images_controller_test.rb
viva-resource_controller-0.6.5.2 test/test/functional/images_controller_test.rb
viva-resource_controller-0.6.5 test/test/functional/images_controller_test.rb
matid-resource_controller-0.7.2 test/test/functional/images_controller_test.rb
matid-resource_controller-0.7.1 test/test/functional/images_controller_test.rb
matid-resource_controller-0.7.0 test/test/functional/images_controller_test.rb
resource_controller_views-0.6.6.views2 test/test/functional/images_controller_test.rb
matid-resource_controller-0.6.7 test/test/functional/images_controller_test.rb
resource_controller_views-0.6.6 test/test/functional/images_controller_test.rb
resource_controller-0.6.6 test/test/functional/images_controller_test.rb
Pr0d1r2-resource_controller-0.6.6 test/test/functional/images_controller_test.rb
matid-resource_controller-0.6.6 test/test/functional/images_controller_test.rb
viva-resource_controller-0.6.5.3 test/test/functional/images_controller_test.rb
matid-resource_controller-0.6.5 test/test/functional/images_controller_test.rb