Sha256: 8db4de1925a03ead952218fbf1b2332821d834e9a21491d6c005faa081f55e85

Contents?: true

Size: 685 Bytes

Versions: 6

Compression:

Stored size: 685 Bytes

Contents

require 'test_helper'

class CheckoutsHelperTest < ActionView::TestCase
  context "with current_user" do
    setup do
      self.stub!(:current_user, :return => User.new)
    end
    context "checkout_steps" do
      setup { @steps = checkout_steps }
      should "not contain the registration step" do
        assert_does_not_contain(@steps, 'registration')
      end
    end
  end
  context "with no current_user" do
    setup do 
      self.stub!(:current_user, :return => nil)
    end
    context "checkout_steps" do
      setup { @steps = checkout_steps }
      should "contain the registration step" do
        assert_contains(@steps, 'registration')
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
spree-enriquez-0.9.4 test/unit/helpers/checkouts_helper_test.rb
spree-0.9.4 test/unit/helpers/checkouts_helper_test.rb
spree-0.9.3 test/unit/helpers/checkouts_helper_test.rb
spree-0.9.2 test/unit/helpers/checkouts_helper_test.rb
spree-0.9.1 test/unit/helpers/checkouts_helper_test.rb
spree-0.9.0 test/unit/helpers/checkouts_helper_test.rb