Sha256: 63a51a0eb0dfb3de794bd3c505ad1656002dfa4b84cb176415db41c8c464aa75

Contents?: true

Size: 1016 Bytes

Versions: 6

Compression:

Stored size: 1016 Bytes

Contents

require 'test_helper'

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

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

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

    assert_redirected_to article_path(assigns(:article))
  end

  test "should show article" do
    get :show, :id => articles(:one).id
    assert_response :success
  end

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

  test "should update article" do
    put :update, :id => articles(:one).id, :article => { }
    assert_redirected_to article_path(assigns(:article))
  end

  test "should destroy article" do
    assert_difference('Article.count', -1) do
      delete :destroy, :id => articles(:one).id
    end

    assert_redirected_to articles_path
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
gettext_rails-2.1.0 sample/test/functional/articles_controller_test.rb
gettext_rails-2.0.1 sample/test/functional/articles_controller_test.rb
gettext_rails-2.0.2 sample/test/functional/articles_controller_test.rb
gettext_rails-2.0.0 sample/test/functional/articles_controller_test.rb
gettext_rails-2.0.3 sample/test/functional/articles_controller_test.rb
gettext_rails-2.0.4 sample/test/functional/articles_controller_test.rb