Sha256: 97b61f47d2902651a05eef87039faa904a9351ce194210c34a9ab8fa963000fb

Contents?: true

Size: 429 Bytes

Versions: 10

Compression:

Stored size: 429 Bytes

Contents

require 'test_helper'

class PostsControllerTest < ActionController::TestCase
  def setup
    @post = Post.find 1
  end

  context "on post to :create" do
    setup do
      post :create, :post => {}
    end

    should "name the post 'a great post'" do
      assert_equal 'a great post', assigns(:post).title
    end

    should "give the post a body of '...'" do
      assert_equal '...', assigns(:post).body
    end
  end
end

Version data entries

10 entries across 10 versions & 3 rubygems

Version Path
resources_controller-1.0.4 test/test/functional/posts_controller_test.rb
resources_controller-1.0.3 test/test/functional/posts_controller_test.rb
resources_controller-1.0.2 test/test/functional/posts_controller_test.rb
makandra_resource_controller-0.7.3 test/test/functional/posts_controller_test.rb
makandra_resource_controller-0.7.2 test/test/functional/posts_controller_test.rb
rd_resource_controller-1.0.1 test/test/functional/posts_controller_test.rb
rd_resource_controller-1.0.0 test/test/functional/posts_controller_test.rb
makandra_resource_controller-0.7.1 test/test/functional/posts_controller_test.rb
makandra_resource_controller-0.7.0 test/test/functional/posts_controller_test.rb
rd_resource_controller-1.0.0.rc test/test/functional/posts_controller_test.rb