Sha256: 6b21dcc0705371e0ff905e69e7dd928d0d5b06ac89fdada2d66803b13abc07fa
Contents?: true
Size: 1.33 KB
Versions: 4
Compression:
Stored size: 1.33 KB
Contents
require 'test_helper' class IncludeNavigationTest < ActiveSupport::IntegrationCase test 'index forwards to first step by default' do visit(bar_index_path) assert has_content?("first") end test 'index forwards params to first step' do visit(bar_index_path(:foo => "first")) assert has_content?("params[:foo] first") end test 'show first' do step = :first visit(bar_path(step)) assert has_content?(step.to_s) end test 'show second' do step = :second visit(bar_path(step)) assert has_content?(step.to_s) end test 'skip first' do step = :first visit(bar_path(step, :skip_step => 'true')) assert has_content?(:second.to_s) end test 'pointer to first' do visit(bar_path(Wicked::FIRST_STEP)) assert has_content?('first') end test 'pointer to last' do visit(bar_path(Wicked::LAST_STEP)) assert has_content?('last_step') end test 'invalid step' do step = :notastep assert_raise(ActionView::MissingTemplate) do visit(bar_path(step)) end end test 'finish' do step = Wicked::FINISH_STEP visit(bar_path(step)) assert has_content?('home') end test 'finish with flash' do step = Wicked::FINISH_STEP visit bar_path(step, :notice => 'yo') assert has_content?('home') assert has_content?('notice:yo') end end
Version data entries
4 entries across 4 versions & 1 rubygems