Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adjusting subscription <-> user relation to has_many to better reflect reality #2039

Merged
merged 11 commits into from Jan 17, 2018

Conversation

@tansaku
Copy link
Member

@tansaku tansaku commented Dec 22, 2017

fixes #1429
fixes #1977

@tansaku tansaku changed the title get 500 reporting working again [WIP] adjusting subscription <-> user relation to has_many to better reflect reality Dec 22, 2017
@tansaku tansaku force-pushed the 1429_have_premium_upgrades_close_out_old_subscription branch from 510416c to 74574e9 Jan 2, 2018
context 'look up stripe id from subscription' do
let(:subscription) { mock_model(Subscription, save: true) }
before { allow(subscription).to receive(:[]=) }
context 'supporting current subscription' do

This comment has been minimized.

@tansaku

tansaku Jan 15, 2018
Author Member

could re-do this with message chains rather than factory girl ...

This comment has been minimized.

@tansaku

tansaku Jan 17, 2018
Author Member

gonna leave that to a refactoring ticket

This comment has been minimized.

@tansaku

tansaku Jan 17, 2018
Author Member

see #2103

tansaku added 5 commits Jan 15, 2018
…w an error if failed, and weird race condition
… premium mob stripe upgrade creates new subscription rather than overwriting previous one
@tansaku tansaku changed the title [WIP] adjusting subscription <-> user relation to has_many to better reflect reality adjusting subscription <-> user relation to has_many to better reflect reality Jan 16, 2018
…subscription
@tansaku tansaku merged commit ba0b364 into develop Jan 17, 2018
3 checks passed
3 checks passed
codeclimate All good!
Details
coverage/coveralls Coverage remained the same at 84.185%
Details
semaphoreci The build passed on Semaphore.
Details
mattwr18 pushed a commit that referenced this pull request Jan 28, 2019
…t reality (#2039)

* first step with various fails

* added current_subscription method, which works, but tests are now factory girl based and not finished ...

* updates user to avoid any use of old subscription method and prefer current_subscription

* adjust service test to check we add subscriptions on top of old ones

* fixing a step that was missing teeth, making saving subscription throw an error if failed, and weird race condition

* ensure previous subscriptions are ended when new ones start, and that premium mob stripe upgrade creates new subscription rather than overwriting previous one

* clean up spec

* running down a time comparison issue

* clean up and fix migration bug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant