Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshida_i committed May 9, 2016
1 parent ac2453f commit e6df3df
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
2 changes: 2 additions & 0 deletions app/models/spree/shipment_decorator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

delegate :supplier, to: :stock_location

self.whitelisted_ransackable_attributes = %w(number state)

def display_final_price_with_items
Spree::Money.new final_price_with_items
end
Expand Down
5 changes: 4 additions & 1 deletion spec/features/admin/stock_management_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@
@v.stock_items.first.update_column(:count_on_hand, 10)
@secondary.stock_item(@v).destroy
click_link "Products"
sleep(1)
within '#sidebar-product' do
click_link 'Products'
click_link "Products"
end
click_link @product.name
within '[data-hook=admin_product_tabs]' do
Expand Down Expand Up @@ -111,6 +112,7 @@
v.stock_items.first.update_column(:count_on_hand, 30)

click_link "Products"
sleep(1)
within '#sidebar-product' do
click_link 'Products'
end
Expand Down Expand Up @@ -138,6 +140,7 @@
@product.variants.create!(sku: 'FOOBAR')
Spree::StockLocation.delete_all
click_link "Products"
sleep(1)
within '#sidebar-product' do
click_link 'Products'
end
Expand Down
7 changes: 7 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,10 @@
config.color = true
config.infer_spec_type_from_file_location!
end

Shoulda::Matchers.configure do |config|
config.integrate do |with|
with.test_framework :rspec
with.library :rails
end
end
2 changes: 1 addition & 1 deletion spree_drop_ship.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Gem::Specification.new do |s|
s.add_development_dependency 'ffaker'
s.add_development_dependency 'launchy'
s.add_development_dependency 'rspec-rails', '~> 2.99'
s.add_development_dependency 'sass-rails', '~> 4.0.2'
s.add_development_dependency 'sass-rails', '~> 5.0.0.beta1'
s.add_development_dependency 'selenium-webdriver'
s.add_development_dependency 'shoulda-matchers'
s.add_development_dependency 'spree_auth_devise'
Expand Down

0 comments on commit e6df3df

Please sign in to comment.