Sha256: 49132e7ee1d62d30ccb9dd01e7d41fb1b01173986cd3c89a6149d32997c300dc

Contents?: true

Size: 1.42 KB

Versions: 6

Compression:

Stored size: 1.42 KB

Contents

require 'test_helper'

module Wafflemix
  class PagesControllerTest < ActionController::TestCase
    setup do
      @page = pages(:one)
    end
  
    test "should get index" do
      get :index
      assert_response :success
      assert_not_nil assigns(:pages)
    end
  
    test "should get new" do
      get :new
      assert_response :success
    end
  
    test "should create page" do
      assert_difference('Page.count') do
        post :create, page: { deletable: @page.deletable, draft: @page.draft, link_url: @page.link_url, parent_id: @page.parent_id, position: @page.position, show_in_menu: @page.show_in_menu, skip_to_first: @page.skip_to_first }
      end
  
      assert_redirected_to page_path(assigns(:page))
    end
  
    test "should show page" do
      get :show, id: @page
      assert_response :success
    end
  
    test "should get edit" do
      get :edit, id: @page
      assert_response :success
    end
  
    test "should update page" do
      put :update, id: @page, page: { deletable: @page.deletable, draft: @page.draft, link_url: @page.link_url, parent_id: @page.parent_id, position: @page.position, show_in_menu: @page.show_in_menu, skip_to_first: @page.skip_to_first }
      assert_redirected_to page_path(assigns(:page))
    end
  
    test "should destroy page" do
      assert_difference('Page.count', -1) do
        delete :destroy, id: @page
      end
  
      assert_redirected_to pages_path
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
wafflemix-0.0.6 test/functional/wafflemix/pages_controller_test.rb
wafflemix-0.0.5 test/functional/wafflemix/pages_controller_test.rb
wafflemix-0.0.4 test/functional/wafflemix/pages_controller_test.rb
wafflemix-0.0.3 test/functional/wafflemix/pages_controller_test.rb
wafflemix-0.0.2 test/functional/wafflemix/pages_controller_test.rb
wafflemix-0.0.1 test/functional/wafflemix/pages_controller_test.rb