Sha256: 3d7e59a150d0259f801cd0088ab294378430d258176ceeaf11f62104f5890216

Contents?: true

Size: 725 Bytes

Versions: 5

Compression:

Stored size: 725 Bytes

Contents

# -*- coding: utf-8 -*-
require 'test_helper'

class GetsTrolliedTest < ActiveSupport::TestCase
  context "A model that can be trollied" do
    setup do
      @item = Factory.create(:item)
    end

    should "be able to be added to a trolley" do
      @trolley = Factory.create(:trolley)
      @item.place_in(@trolley)

      assert @trolley.selected_order

      @order = @trolley.selected_order

      assert_purchasable_item_matches
    end

    should "answer description_for_purchasing" do
      assert_respond_to @item, :description_for_purchasing
    end

    should "return mapped attribute value from description_for_purchasing" do
      assert_equal @item.label, @item.description_for_purchasing
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
trollied-0.1.4 test/full_2_3_5_app_with_tests/test/unit/gets_trollied_test.rb
trollied-0.1.3 test/full_2_3_5_app_with_tests/test/unit/gets_trollied_test.rb
trollied-0.1.2 test/full_2_3_5_app_with_tests/test/unit/gets_trollied_test.rb
trollied-0.1.1 test/full_2_3_5_app_with_tests/test/unit/gets_trollied_test.rb
trollied-0.1.0 test/full_2_3_5_app_with_tests/test/unit/gets_trollied_test.rb