Update rails to version 4.2
Furthermore it was necessary to add the following gems: - responders - web-console And additional it was necessary to update these gems manually: - devise - turbolinks - delayed_job_active_record - money-rails And the corresponding dependencies. http://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html#upgrading-from-rails-4-1-to-rails-4-2
This commit is contained in:
parent
57610eb39e
commit
9e9c536946
5 changed files with 110 additions and 69 deletions
7
Gemfile
7
Gemfile
|
|
@ -1,7 +1,11 @@
|
||||||
source 'https://rubygems.org'
|
source 'https://rubygems.org'
|
||||||
|
|
||||||
# as web framework
|
# as web framework
|
||||||
gem 'rails', '~> 4.1'
|
gem 'rails', '~> 4.2'
|
||||||
|
|
||||||
|
# respond_to methods have been extracted to the responders gem
|
||||||
|
# http://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html#responders
|
||||||
|
gem 'responders', '~> 2.0'
|
||||||
|
|
||||||
# as the database for Active Record
|
# as the database for Active Record
|
||||||
gem 'mysql2'
|
gem 'mysql2'
|
||||||
|
|
@ -138,6 +142,7 @@ group :development do
|
||||||
gem 'letter_opener'
|
gem 'letter_opener'
|
||||||
# mina is a blazing fast deployment system
|
# mina is a blazing fast deployment system
|
||||||
gem 'mina'
|
gem 'mina'
|
||||||
|
gem 'web-console', '~> 2.0'
|
||||||
end
|
end
|
||||||
|
|
||||||
# Use rspec and capybara as testing framework
|
# Use rspec and capybara as testing framework
|
||||||
|
|
|
||||||
156
Gemfile.lock
156
Gemfile.lock
|
|
@ -8,35 +8,44 @@ GIT
|
||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
actionmailer (4.1.14)
|
actionmailer (4.2.5.1)
|
||||||
actionpack (= 4.1.14)
|
actionpack (= 4.2.5.1)
|
||||||
actionview (= 4.1.14)
|
actionview (= 4.2.5.1)
|
||||||
|
activejob (= 4.2.5.1)
|
||||||
mail (~> 2.5, >= 2.5.4)
|
mail (~> 2.5, >= 2.5.4)
|
||||||
actionpack (4.1.14)
|
rails-dom-testing (~> 1.0, >= 1.0.5)
|
||||||
actionview (= 4.1.14)
|
actionpack (4.2.5.1)
|
||||||
activesupport (= 4.1.14)
|
actionview (= 4.2.5.1)
|
||||||
rack (~> 1.5.2)
|
activesupport (= 4.2.5.1)
|
||||||
|
rack (~> 1.6)
|
||||||
rack-test (~> 0.6.2)
|
rack-test (~> 0.6.2)
|
||||||
actionview (4.1.14)
|
rails-dom-testing (~> 1.0, >= 1.0.5)
|
||||||
activesupport (= 4.1.14)
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
||||||
|
actionview (4.2.5.1)
|
||||||
|
activesupport (= 4.2.5.1)
|
||||||
builder (~> 3.1)
|
builder (~> 3.1)
|
||||||
erubis (~> 2.7.0)
|
erubis (~> 2.7.0)
|
||||||
|
rails-dom-testing (~> 1.0, >= 1.0.5)
|
||||||
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
||||||
active_model_serializers (0.8.1)
|
active_model_serializers (0.8.1)
|
||||||
activemodel (>= 3.0)
|
activemodel (>= 3.0)
|
||||||
activemodel (4.1.14)
|
activejob (4.2.5.1)
|
||||||
activesupport (= 4.1.14)
|
activesupport (= 4.2.5.1)
|
||||||
|
globalid (>= 0.3.0)
|
||||||
|
activemodel (4.2.5.1)
|
||||||
|
activesupport (= 4.2.5.1)
|
||||||
builder (~> 3.1)
|
builder (~> 3.1)
|
||||||
activerecord (4.1.14)
|
activerecord (4.2.5.1)
|
||||||
activemodel (= 4.1.14)
|
activemodel (= 4.2.5.1)
|
||||||
activesupport (= 4.1.14)
|
activesupport (= 4.2.5.1)
|
||||||
arel (~> 5.0.0)
|
arel (~> 6.0)
|
||||||
activesupport (4.1.14)
|
activesupport (4.2.5.1)
|
||||||
i18n (~> 0.6, >= 0.6.9)
|
i18n (~> 0.7)
|
||||||
json (~> 1.7, >= 1.7.7)
|
json (~> 1.7, >= 1.7.7)
|
||||||
minitest (~> 5.1)
|
minitest (~> 5.1)
|
||||||
thread_safe (~> 0.1)
|
thread_safe (~> 0.3, >= 0.3.4)
|
||||||
tzinfo (~> 1.1)
|
tzinfo (~> 1.1)
|
||||||
activeuuid (0.5.0)
|
activeuuid (0.6.1)
|
||||||
activerecord (>= 3.1)
|
activerecord (>= 3.1)
|
||||||
uuidtools
|
uuidtools
|
||||||
acts_as_commentable_with_threading (1.2.0)
|
acts_as_commentable_with_threading (1.2.0)
|
||||||
|
|
@ -54,7 +63,7 @@ GEM
|
||||||
request_store
|
request_store
|
||||||
user_agent_parser
|
user_agent_parser
|
||||||
uuidtools
|
uuidtools
|
||||||
arel (5.0.1.20140414130214)
|
arel (6.0.3)
|
||||||
ast (2.0.0)
|
ast (2.0.0)
|
||||||
autoprefixer-rails (5.1.9)
|
autoprefixer-rails (5.1.9)
|
||||||
execjs
|
execjs
|
||||||
|
|
@ -69,6 +78,8 @@ GEM
|
||||||
axlsx (>= 2.0.1)
|
axlsx (>= 2.0.1)
|
||||||
rails (>= 3.1)
|
rails (>= 3.1)
|
||||||
bcrypt (3.1.10)
|
bcrypt (3.1.10)
|
||||||
|
binding_of_caller (0.7.2)
|
||||||
|
debug_inspector (>= 0.0.1)
|
||||||
bootstrap-sass (3.3.4.1)
|
bootstrap-sass (3.3.4.1)
|
||||||
autoprefixer-rails (>= 5.0.0.1)
|
autoprefixer-rails (>= 5.0.0.1)
|
||||||
sass (>= 3.2.19)
|
sass (>= 3.2.19)
|
||||||
|
|
@ -102,13 +113,13 @@ GEM
|
||||||
climate_control (>= 0.0.3, < 1.0)
|
climate_control (>= 0.0.3, < 1.0)
|
||||||
cocoon (1.2.6)
|
cocoon (1.2.6)
|
||||||
coderay (1.1.0)
|
coderay (1.1.0)
|
||||||
coffee-rails (4.0.1)
|
coffee-rails (4.1.1)
|
||||||
coffee-script (>= 2.2.0)
|
coffee-script (>= 2.2.0)
|
||||||
railties (>= 4.0.0, < 5.0)
|
railties (>= 4.0.0, < 5.1.x)
|
||||||
coffee-script (2.2.0)
|
coffee-script (2.4.1)
|
||||||
coffee-script-source
|
coffee-script-source
|
||||||
execjs
|
execjs
|
||||||
coffee-script-source (1.7.0)
|
coffee-script-source (1.10.0)
|
||||||
columnize (0.8.9)
|
columnize (0.8.9)
|
||||||
countries (0.9.3)
|
countries (0.9.3)
|
||||||
currencies (~> 0.4.2)
|
currencies (~> 0.4.2)
|
||||||
|
|
@ -123,13 +134,14 @@ GEM
|
||||||
railties (>= 3.1.0)
|
railties (>= 3.1.0)
|
||||||
daemons (1.1.9)
|
daemons (1.1.9)
|
||||||
database_cleaner (1.3.0)
|
database_cleaner (1.3.0)
|
||||||
|
debug_inspector (0.0.2)
|
||||||
debugger-linecache (1.2.0)
|
debugger-linecache (1.2.0)
|
||||||
delayed_job (4.0.2)
|
delayed_job (4.1.1)
|
||||||
activesupport (>= 3.0, < 4.2)
|
activesupport (>= 3.0, < 5.0)
|
||||||
delayed_job_active_record (4.0.1)
|
delayed_job_active_record (4.1.0)
|
||||||
activerecord (>= 3.0, < 4.2)
|
activerecord (>= 3.0, < 5)
|
||||||
delayed_job (>= 3.0, < 4.1)
|
delayed_job (>= 3.0, < 5)
|
||||||
devise (3.5.4)
|
devise (3.5.5)
|
||||||
bcrypt (~> 3.0)
|
bcrypt (~> 3.0)
|
||||||
orm_adapter (~> 0.1)
|
orm_adapter (~> 0.1)
|
||||||
railties (>= 3.2.6, < 5)
|
railties (>= 3.2.6, < 5)
|
||||||
|
|
@ -141,7 +153,7 @@ GEM
|
||||||
diff-lcs (1.2.5)
|
diff-lcs (1.2.5)
|
||||||
docile (1.1.3)
|
docile (1.1.3)
|
||||||
erubis (2.7.0)
|
erubis (2.7.0)
|
||||||
execjs (2.5.2)
|
execjs (2.6.0)
|
||||||
factory_girl (4.4.0)
|
factory_girl (4.4.0)
|
||||||
activesupport (>= 3.0.0)
|
activesupport (>= 3.0.0)
|
||||||
factory_girl_rails (4.4.1)
|
factory_girl_rails (4.4.1)
|
||||||
|
|
@ -158,6 +170,8 @@ GEM
|
||||||
formtastic-bootstrap (3.0.0)
|
formtastic-bootstrap (3.0.0)
|
||||||
formtastic (>= 2.2)
|
formtastic (>= 2.2)
|
||||||
geocoder (1.2.2)
|
geocoder (1.2.2)
|
||||||
|
globalid (0.3.6)
|
||||||
|
activesupport (>= 4.1.0)
|
||||||
gravtastic (3.2.6)
|
gravtastic (3.2.6)
|
||||||
guard (2.6.0)
|
guard (2.6.0)
|
||||||
formatador (>= 0.2.4)
|
formatador (>= 0.2.4)
|
||||||
|
|
@ -181,7 +195,7 @@ GEM
|
||||||
activesupport
|
activesupport
|
||||||
builder
|
builder
|
||||||
htmlentities (4.3.1)
|
htmlentities (4.3.1)
|
||||||
i18n (0.6.11)
|
i18n (0.7.0)
|
||||||
inversion (0.12.3)
|
inversion (0.12.3)
|
||||||
loggability (~> 0.4)
|
loggability (~> 0.4)
|
||||||
jquery-datatables-rails (2.2.3)
|
jquery-datatables-rails (2.2.3)
|
||||||
|
|
@ -203,6 +217,8 @@ GEM
|
||||||
rb-fsevent (>= 0.9.3)
|
rb-fsevent (>= 0.9.3)
|
||||||
rb-inotify (>= 0.9)
|
rb-inotify (>= 0.9)
|
||||||
loggability (0.11.0)
|
loggability (0.11.0)
|
||||||
|
loofah (2.0.3)
|
||||||
|
nokogiri (>= 1.5.9)
|
||||||
lumberjack (1.0.5)
|
lumberjack (1.0.5)
|
||||||
mail (2.6.3)
|
mail (2.6.3)
|
||||||
mime-types (>= 1.16, < 3)
|
mime-types (>= 1.16, < 3)
|
||||||
|
|
@ -212,18 +228,19 @@ GEM
|
||||||
mina (0.3.0)
|
mina (0.3.0)
|
||||||
open4
|
open4
|
||||||
rake
|
rake
|
||||||
mini_portile (0.6.0)
|
mini_portile2 (2.0.0)
|
||||||
minitest (5.8.3)
|
minitest (5.8.4)
|
||||||
momentjs-rails (2.8.1)
|
momentjs-rails (2.8.1)
|
||||||
railties (>= 3.1)
|
railties (>= 3.1)
|
||||||
monetize (0.3.0)
|
monetize (1.4.0)
|
||||||
money (~> 6.1.0.beta1)
|
money (~> 6.7)
|
||||||
money (6.1.1)
|
money (6.7.0)
|
||||||
i18n (~> 0.6.4)
|
i18n (>= 0.6.4, <= 0.7.0)
|
||||||
money-rails (0.12.0)
|
sixarm_ruby_unaccent (>= 1.1.1, < 2)
|
||||||
|
money-rails (1.6.0)
|
||||||
activesupport (>= 3.0)
|
activesupport (>= 3.0)
|
||||||
monetize (~> 0.3.0)
|
monetize (~> 1.4.0)
|
||||||
money (~> 6.1.1)
|
money (~> 6.7)
|
||||||
railties (>= 3.0)
|
railties (>= 3.0)
|
||||||
multi_json (1.11.2)
|
multi_json (1.11.2)
|
||||||
multi_xml (0.5.5)
|
multi_xml (0.5.5)
|
||||||
|
|
@ -231,8 +248,8 @@ GEM
|
||||||
mysql2 (0.3.16)
|
mysql2 (0.3.16)
|
||||||
netrc (0.10.3)
|
netrc (0.10.3)
|
||||||
nio4r (1.1.0)
|
nio4r (1.1.0)
|
||||||
nokogiri (1.6.2.1)
|
nokogiri (1.6.7.2)
|
||||||
mini_portile (= 0.6.0)
|
mini_portile2 (~> 2.0.0.rc2)
|
||||||
oauth2 (0.9.4)
|
oauth2 (0.9.4)
|
||||||
faraday (>= 0.8, < 0.10)
|
faraday (>= 0.8, < 0.10)
|
||||||
jwt (~> 1.0)
|
jwt (~> 1.0)
|
||||||
|
|
@ -296,27 +313,36 @@ GEM
|
||||||
slop (~> 3.4)
|
slop (~> 3.4)
|
||||||
quiet_assets (1.0.2)
|
quiet_assets (1.0.2)
|
||||||
railties (>= 3.1, < 5.0)
|
railties (>= 3.1, < 5.0)
|
||||||
rack (1.5.5)
|
rack (1.6.4)
|
||||||
rack-openid (1.3.1)
|
rack-openid (1.3.1)
|
||||||
rack (>= 1.1.0)
|
rack (>= 1.1.0)
|
||||||
ruby-openid (>= 2.1.8)
|
ruby-openid (>= 2.1.8)
|
||||||
rack-test (0.6.3)
|
rack-test (0.6.3)
|
||||||
rack (>= 1.0)
|
rack (>= 1.0)
|
||||||
rails (4.1.14)
|
rails (4.2.5.1)
|
||||||
actionmailer (= 4.1.14)
|
actionmailer (= 4.2.5.1)
|
||||||
actionpack (= 4.1.14)
|
actionpack (= 4.2.5.1)
|
||||||
actionview (= 4.1.14)
|
actionview (= 4.2.5.1)
|
||||||
activemodel (= 4.1.14)
|
activejob (= 4.2.5.1)
|
||||||
activerecord (= 4.1.14)
|
activemodel (= 4.2.5.1)
|
||||||
activesupport (= 4.1.14)
|
activerecord (= 4.2.5.1)
|
||||||
|
activesupport (= 4.2.5.1)
|
||||||
bundler (>= 1.3.0, < 2.0)
|
bundler (>= 1.3.0, < 2.0)
|
||||||
railties (= 4.1.14)
|
railties (= 4.2.5.1)
|
||||||
sprockets-rails (~> 2.0)
|
sprockets-rails
|
||||||
|
rails-deprecated_sanitizer (1.0.3)
|
||||||
|
activesupport (>= 4.2.0.alpha)
|
||||||
|
rails-dom-testing (1.0.7)
|
||||||
|
activesupport (>= 4.2.0.beta, < 5.0)
|
||||||
|
nokogiri (~> 1.6.0)
|
||||||
|
rails-deprecated_sanitizer (>= 1.0.1)
|
||||||
|
rails-html-sanitizer (1.0.3)
|
||||||
|
loofah (~> 2.0)
|
||||||
rails-observers (0.1.2)
|
rails-observers (0.1.2)
|
||||||
activemodel (~> 4.0)
|
activemodel (~> 4.0)
|
||||||
railties (4.1.14)
|
railties (4.2.5.1)
|
||||||
actionpack (= 4.1.14)
|
actionpack (= 4.2.5.1)
|
||||||
activesupport (= 4.1.14)
|
activesupport (= 4.2.5.1)
|
||||||
rake (>= 0.8.7)
|
rake (>= 0.8.7)
|
||||||
thor (>= 0.18.1, < 2.0)
|
thor (>= 0.18.1, < 2.0)
|
||||||
rainbow (2.0.0)
|
rainbow (2.0.0)
|
||||||
|
|
@ -334,8 +360,8 @@ GEM
|
||||||
redcarpet (3.2.3)
|
redcarpet (3.2.3)
|
||||||
referer-parser (0.2.1)
|
referer-parser (0.2.1)
|
||||||
request_store (1.0.6)
|
request_store (1.0.6)
|
||||||
responders (1.1.2)
|
responders (2.1.1)
|
||||||
railties (>= 3.2, < 4.2)
|
railties (>= 4.2.0, < 5.1)
|
||||||
rest-client (1.7.3)
|
rest-client (1.7.3)
|
||||||
mime-types (>= 1.16, < 3.0)
|
mime-types (>= 1.16, < 3.0)
|
||||||
netrc (~> 0.7)
|
netrc (~> 0.7)
|
||||||
|
|
@ -387,6 +413,7 @@ GEM
|
||||||
multi_json
|
multi_json
|
||||||
simplecov-html (~> 0.8.0)
|
simplecov-html (~> 0.8.0)
|
||||||
simplecov-html (0.8.0)
|
simplecov-html (0.8.0)
|
||||||
|
sixarm_ruby_unaccent (1.1.1)
|
||||||
slop (3.6.0)
|
slop (3.6.0)
|
||||||
spring (1.1.2)
|
spring (1.1.2)
|
||||||
spring-commands-rspec (1.0.2)
|
spring-commands-rspec (1.0.2)
|
||||||
|
|
@ -411,7 +438,7 @@ GEM
|
||||||
tins (1.1.0)
|
tins (1.1.0)
|
||||||
transitions (0.1.12)
|
transitions (0.1.12)
|
||||||
ttfunk (1.1.1)
|
ttfunk (1.1.1)
|
||||||
turbolinks (2.2.2)
|
turbolinks (2.5.3)
|
||||||
coffee-rails
|
coffee-rails
|
||||||
tzinfo (1.2.2)
|
tzinfo (1.2.2)
|
||||||
thread_safe (~> 0.1)
|
thread_safe (~> 0.1)
|
||||||
|
|
@ -419,9 +446,14 @@ GEM
|
||||||
execjs (>= 0.3.0)
|
execjs (>= 0.3.0)
|
||||||
json (>= 1.8.0)
|
json (>= 1.8.0)
|
||||||
user_agent_parser (2.1.5)
|
user_agent_parser (2.1.5)
|
||||||
uuidtools (2.1.4)
|
uuidtools (2.1.5)
|
||||||
warden (1.2.4)
|
warden (1.2.4)
|
||||||
rack (>= 1.0)
|
rack (>= 1.0)
|
||||||
|
web-console (2.2.1)
|
||||||
|
activemodel (>= 4.0)
|
||||||
|
binding_of_caller (>= 0.7.2)
|
||||||
|
railties (>= 4.0)
|
||||||
|
sprockets-rails (>= 2.0, < 4.0)
|
||||||
websocket-driver (0.3.3)
|
websocket-driver (0.3.3)
|
||||||
whenever (0.9.2)
|
whenever (0.9.2)
|
||||||
activesupport (>= 2.3.4)
|
activesupport (>= 2.3.4)
|
||||||
|
|
@ -486,10 +518,11 @@ DEPENDENCIES
|
||||||
poltergeist
|
poltergeist
|
||||||
prawn_rails
|
prawn_rails
|
||||||
quiet_assets
|
quiet_assets
|
||||||
rails (~> 4.1)
|
rails (~> 4.2)
|
||||||
rails-observers
|
rails-observers
|
||||||
rdoc-generator-fivefish
|
rdoc-generator-fivefish
|
||||||
redcarpet
|
redcarpet
|
||||||
|
responders (~> 2.0)
|
||||||
rolify
|
rolify
|
||||||
rspec-activemodel-mocks
|
rspec-activemodel-mocks
|
||||||
rspec-rails
|
rspec-rails
|
||||||
|
|
@ -503,6 +536,7 @@ DEPENDENCIES
|
||||||
transitions
|
transitions
|
||||||
turbolinks
|
turbolinks
|
||||||
uglifier (>= 1.3.0)
|
uglifier (>= 1.3.0)
|
||||||
|
web-console (~> 2.0)
|
||||||
whenever
|
whenever
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ We are using [Vagrant](https://www.vagrantup.com/) to create our development env
|
||||||
7. Start your OSEM rails app:
|
7. Start your OSEM rails app:
|
||||||
|
|
||||||
```
|
```
|
||||||
vagrant exec rails s
|
vagrant exec rails server -b 0.0.0.0
|
||||||
```
|
```
|
||||||
|
|
||||||
8. Check out your OSEM rails app:
|
8. Check out your OSEM rails app:
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,8 @@ feature Ticket do
|
||||||
click_button 'Update Ticket'
|
click_button 'Update Ticket'
|
||||||
|
|
||||||
ticket.reload
|
ticket.reload
|
||||||
expect(ticket.price).to eq(50)
|
# It's necessary to multiply by 100 because the price is in cents
|
||||||
|
expect(ticket.price).to eq(Money.new(50 * 100, 'USD'))
|
||||||
expect(ticket.title).to eq('Free Ticket')
|
expect(ticket.title).to eq('Free Ticket')
|
||||||
expect(flash).to eq('Ticket successfully updated.')
|
expect(flash).to eq('Ticket successfully updated.')
|
||||||
expect(Ticket.count).to eq(1)
|
expect(Ticket.count).to eq(1)
|
||||||
|
|
@ -68,7 +69,8 @@ feature Ticket do
|
||||||
click_button 'Update Ticket'
|
click_button 'Update Ticket'
|
||||||
|
|
||||||
ticket.reload
|
ticket.reload
|
||||||
expect(ticket.price).to eq(100)
|
# It's necessary to multiply by 100 because the price is in cents
|
||||||
|
expect(ticket.price).to eq(Money.new(100 * 100, 'USD'))
|
||||||
expect(ticket.title).to eq('Business Ticket')
|
expect(ticket.title).to eq('Business Ticket')
|
||||||
expect(flash).to eq("Ticket update failed: Title can't be blank. Price cents must be greater than 0.")
|
expect(flash).to eq("Ticket update failed: Title can't be blank. Price cents must be greater than 0.")
|
||||||
expect(Ticket.count).to eq(1)
|
expect(Ticket.count).to eq(1)
|
||||||
|
|
|
||||||
|
|
@ -68,11 +68,11 @@ describe Ticket do
|
||||||
user: user,
|
user: user,
|
||||||
ticket: ticket,
|
ticket: ticket,
|
||||||
quantity: 20)
|
quantity: 20)
|
||||||
expect(ticket.total_price(user)).to eq(20 * 50)
|
expect(ticket.total_price(user)).to eq(Money.new(20 * ticket.price_cents, 'USD'))
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'returns zero if the user has not bought this ticket' do
|
it 'returns zero if the user has not bought this ticket' do
|
||||||
expect(ticket.total_price(user)).to eq(0)
|
expect(ticket.total_price(user)).to eq(Money.new(0, 'USD'))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -82,11 +82,11 @@ describe Ticket do
|
||||||
user: user,
|
user: user,
|
||||||
ticket: ticket,
|
ticket: ticket,
|
||||||
quantity: 20)
|
quantity: 20)
|
||||||
expect(Ticket.total_price(conference, user)).to eq(20 * 50)
|
expect(Ticket.total_price(conference, user)).to eq(Money.new(20 * ticket.price_cents, 'USD'))
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'returns zero if the user has not bought this ticket' do
|
it 'returns zero if the user has not bought this ticket' do
|
||||||
expect(Ticket.total_price(conference, user)).to eq(0)
|
expect(Ticket.total_price(conference, user)).to eq(Money.new(0, 'USD'))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue