Skip to content

Commit

Permalink
Merge cd3c50b into c4750c9
Browse files Browse the repository at this point in the history
  • Loading branch information
tlclink committed Mar 13, 2019
2 parents c4750c9 + cd3c50b commit 4659003
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 2 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ rvm:
- 2.3
- 2.4
- 2.5
before_install: gem install bundler -v "~>1.0"
script: bundle && bundle exec rake spec
gemfile:
- gemfiles/rails4.gemfile
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ This changelog adheres to [Keep a CHANGELOG](http://keepachangelog.com/).
### Added
- [DC-1418] Port NRMA portal availability cache back to EcomEngine
- [TT-4850] Added client templates
- [DC-1692] Fix error that can be thrown when checking if a product configuration can be priced

### Changed
- [DC-1767] include long/lat changes to Stop
Expand Down
2 changes: 1 addition & 1 deletion lib/quick_travel/product_configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def available?
end

def priced?
@product.pricing_details.present?
@product.try(:pricing_details).present?
end

def price
Expand Down
2 changes: 1 addition & 1 deletion quicktravel_client.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
spec.add_dependency 'money', '>= 3.0', '< 6.0' # 6.0 starts to deprecate/split
spec.add_dependency 'will_paginate'

spec.add_development_dependency 'bundler', '~> 1.7'
spec.add_development_dependency 'bundler', '>= 1.3.0', '< 2.0'
spec.add_development_dependency 'rake'
spec.add_development_dependency 'rspec'
spec.add_development_dependency 'rspec-its'
Expand Down
11 changes: 11 additions & 0 deletions spec/product_configuration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,17 @@
let(:pricing_details) { nil }
it { is_expected.not_to be_priced }
end

context 'when pricing details are omitted' do
let(:product) do
double(
extras: extras,
available?: available
)
end

it { is_expected.not_to be_priced }
end
end

context '#price' do
Expand Down

0 comments on commit 4659003

Please sign in to comment.