Address test failure by actually creating the jam_track_right.
This commit is contained in:
parent
e85be7f0d5
commit
0808ce04f9
|
|
@ -83,7 +83,7 @@ module JamRuby
|
|||
raise RecurlyClientError, "Subscription not found" if paid_subscription.nil?
|
||||
raise RecurlyClientError, "Plan code '#{paid_subscription.plan_code}' doesn't match jam track: '#{jam_track.plan_code}'" if paid_subscription.plan_code != jam_track.plan_code
|
||||
|
||||
jam_track_right=JamRuby::JamTrackRight.find_or_initialize_by_user_id_and_jam_track_id(current_user, jam_track)
|
||||
jam_track_right=JamRuby::JamTrackRight.find_or_create_by_user_id_and_jam_track_id(current_user.id, jam_track.id)
|
||||
raise RecurlyClientError.new("Error creating jam_track_right for jam_track: #{jam_track.id}") if jam_track_right.nil?
|
||||
raise RecurlyClientError.new(jam_track_right.errors) if jam_track_right.errors.any?
|
||||
rescue Recurly::Error, NoMethodError => x
|
||||
|
|
|
|||
Loading…
Reference in New Issue