Sha256: bf75792142114d22e5ab41c2c6b37f4ca630045052e3c07b3ec89f71cd9f6e07
Contents?: true
Size: 796 Bytes
Versions: 3
Compression:
Stored size: 796 Bytes
Contents
# rubocop: disable all require 'test_helper' describe 'Testing origin' do let(:admin) { Order.act_with_flags } let(:order) { Order.new } def setup reset_order end it 'origin category' do Order.add_to_flags :x, origin: :category assert_equal :category, admin.origin end it 'origin category #2' do Order.add_to_flags :x, origin: :category assert_raises { Order.add_to_flags origin: :category2 } end it 'origin category #3' do Order.add_to_flags :x, origin: :category Order.add_to_flags origin: :category end it 'origin default' do Order.add_to_flags :x assert_equal :flags, admin.origin end it 'origin 1' do Order.add_to_flags origin: 1 assert_equal :flags, admin.origin assert order.respond_to?(:origin) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
act_with_flags-0.2.4 | test/origin_test.rb |
act_with_flags-0.2.3 | test/origin_test.rb |
act_with_flags-0.2.0 | test/origin_test.rb |