Sha256: 1ff0c5e753a2386ed83ab74188ab00b2a1d571b45b55968b3f2e6851d711ce04

Contents?: true

Size: 1.06 KB

Versions: 10

Compression:

Stored size: 1.06 KB

Contents

require 'test_helper'

class JumpNavigationTest < ActiveSupport::IntegrationCase
  test 'consider jump_to when calling render_wizard with resource' do
    step = :first
    visit(jump_path(step, :resource => {:save => true}, :jump_to => :last_step))
    assert_has_content?('last_step')
  end

  test 'disregard jump_to when saving the resource fails' do
    step = :first
    visit(jump_path(step, :resource => {:save => false}, :jump_to => :last_step))
    assert_has_content?('first')
    assert !has_content?('last_step')
  end


  test 'skip_step takes :skip_step_options and passes them' do
    step = :first
    visit(jump_path(step, :skip_step => true, :skip_step_options => {:foo => :bar}))
    assert_has_content?('second')
    assert !has_content?('last_step')
  end

  test 'jump_to takes :skip_step_options and passes them' do
    step = :first
    visit(jump_path(step, :resource => {:save => true}, :jump_to => :last_step, :skip_step_options => {:foo => :bar}))
    assert_has_content?("foo")
    assert_has_content?("bar")
    assert_has_content?('last_step')
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
wicked-2.0.0 test/integration/jump_test.rb
wicked-1.4.0 test/integration/jump_test.rb
wicked-1.3.4 test/integration/jump_test.rb
wicked-1.3.3 test/integration/jump_test.rb
wicked-1.3.2 test/integration/jump_test.rb
wicked-1.3.1 test/integration/jump_test.rb
wicked-1.3.0 test/integration/jump_test.rb
wicked-1.2.1 test/integration/jump_test.rb
wicked-1.1.1 test/integration/jump_test.rb
wicked-1.1.0 test/integration/jump_test.rb