Sha256: 8b2836e0434253dc80e7257f5a6de3d8b8d8c90c2034d2ec3b36035dff6c7179

Contents?: true

Size: 952 Bytes

Versions: 2

Compression:

Stored size: 952 Bytes

Contents

require File.dirname(__FILE__) + '/../test_helper'
require 'objects_in_world_controller'

# Re-raise errors caught by the controller.
class ObjectsInWorldController; def rescue_action(e) raise e end; end

class ObjectsInWorldControllerTest < Test::Unit::TestCase
  fixtures :objects_in_world

  def setup
    @controller = ObjectsInWorldController.new
    @request    = ActionController::TestRequest.new
    @response   = ActionController::TestResponse.new

    @first_id = objects_in_world(:logo_pu).id
  end

  def test_index
    get :index
    assert_response :success
    assert_template 'list'
  end

  def test_list
    get :list

    assert_response :success
    assert_template 'list'

    assert_not_nil assigns(:objects_in_world)
  end

  def test_show
    get :show, :id => @first_id

    assert_response :success
    assert_template 'show'

    assert_not_nil assigns(:object_in_world)
    assert assigns(:object_in_world).valid?
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
advertnet-1.0.1 test/functional/objects_in_world_controller_test.rb
advertnet-1.0.0 test/functional/objects_in_world_controller_test.rb