Sha256: 545c29e194ab25f5c7471d91aa325d33697c4bfc8a7fdaad83b453aea753a4aa

Contents?: true

Size: 1002 Bytes

Versions: 7

Compression:

Stored size: 1002 Bytes

Contents

require 'test_helper'

class ForumsControllerTest < ActionController::TestCase
  test "should get index" do
    get :index
    assert_response :success
    assert_not_nil assigns(:forums)
  end

  test "should get new" do
    get :new
    assert_response :success
  end

  test "should create forum" do
    assert_difference('Forum.count') do
      post :create, :forum => { }
    end

    assert_redirected_to forum_path(assigns(:forum))
  end

  test "should show forum" do
    get :show, :id => forums(:one).to_param
    assert_response :success
  end

  test "should get edit" do
    get :edit, :id => forums(:one).to_param
    assert_response :success
  end

  test "should update forum" do
    put :update, :id => forums(:one).to_param, :forum => { }
    assert_redirected_to forum_path(assigns(:forum))
  end

  test "should destroy forum" do
    assert_difference('Forum.count', -1) do
      delete :destroy, :id => forums(:one).to_param
    end

    assert_redirected_to forums_path
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
keen-0.1.0 examples/rails_2/CoolForums/test/functional/forums_controller_test.rb
keen-0.0.53 examples/rails_2/CoolForums/test/functional/forums_controller_test.rb
keen-0.0.52 examples/rails_2/CoolForums/test/functional/forums_controller_test.rb
keen-0.0.5 examples/rails_2/CoolForums/test/functional/forums_controller_test.rb
keen-0.0.4 examples/rails_2/CoolForums/test/functional/forums_controller_test.rb
keen-0.0.2 examples/rails_2/CoolForums/test/functional/forums_controller_test.rb
keen-0.0.1 examples/rails_2/CoolForums/test/functional/forums_controller_test.rb