Sha256: 9d128ff903975de03a5bde52029687482a663fb7d90558b341dab88aa4e50380

Contents?: true

Size: 1.41 KB

Versions: 7

Compression:

Stored size: 1.41 KB

Contents

require 'test_helper'

module SeoPages
  class SeoPagesControllerTest < ActionController::TestCase
    setup do
      @seo_page = seo_pages(:one)
    end

    test "should get index" do
      get :index
      assert_response :success
      assert_not_nil assigns(:seo_pages)
    end

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

    test "should create seo_page" do
      assert_difference('SeoPage.count') do
        post :create, seo_page: { meta_description: @seo_page.meta_description, meta_keywords: @seo_page.meta_keywords, page_title: @seo_page.page_title, url_identifier: @seo_page.url_identifier }
      end

      assert_redirected_to seo_page_path(assigns(:seo_page))
    end

    test "should show seo_page" do
      get :show, id: @seo_page
      assert_response :success
    end

    test "should get edit" do
      get :edit, id: @seo_page
      assert_response :success
    end

    test "should update seo_page" do
      patch :update, id: @seo_page, seo_page: { meta_description: @seo_page.meta_description, meta_keywords: @seo_page.meta_keywords, page_title: @seo_page.page_title, url_identifier: @seo_page.url_identifier }
      assert_redirected_to seo_page_path(assigns(:seo_page))
    end

    test "should destroy seo_page" do
      assert_difference('SeoPage.count', -1) do
        delete :destroy, id: @seo_page
      end

      assert_redirected_to seo_pages_path
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
seo_pages-1.3.2 test/controllers/seo_pages/seo_pages_controller_test.rb
seo_pages-1.3.1 test/controllers/seo_pages/seo_pages_controller_test.rb
seo_pages-1.3.0 test/controllers/seo_pages/seo_pages_controller_test.rb
seo_pages-1.2.1 test/controllers/seo_pages/seo_pages_controller_test.rb
seo_pages-1.2.0 test/controllers/seo_pages/seo_pages_controller_test.rb
seo_pages-1.1.0 test/controllers/seo_pages/seo_pages_controller_test.rb
seo_pages-1.0.1 test/controllers/seo_pages/seo_pages_controller_test.rb