context"when the subscription hasn't been properly downgraded yet"do
let(:plan_name){::Plan::SILVER}
context'when it is currently blocking changes'do
let(:plan_name){::Plan::FREE}
it"shows the expiring message"do
expect(subject).toinclude('Your subscription expired! No worries, you can still use all the Silver features for now. You have 0 days to renew your subscription.')
expect(subject).toinclude('Your subscription has been downgraded.')
end
context"when the subscription hasn't been properly downgraded yet"do
let(:plan_name){::Plan::PREMIUM}
context'no namespace'do
it'has an expiration blocking message'do
expect(subject).toinclude("You didn't renew your subscription so it was downgraded to the GitLab Core Plan")
it"shows the expiring message"do
expect(subject).toinclude('Your subscription expired! No worries, you can still use all the Premium features for now. You have 0 days to renew your subscription.')
expect(subject).toinclude('Something went wrong with your automatic subscription renewal')
it'has an expiration blocking message'do
expect(subject).toinclude("You didn't renew your subscription for No Limit Records so it was downgraded to the free plan")
end
it'has an expiration blocking message'do
expect(subject).toinclude("We tried to automatically renew your subscription for No Limit Records on 2020-03-01 but something went wrong so your subscription was downgraded to the free plan. Don't worry, your data is safe. We suggest you check your payment method and get in touch with our support team (support@gitlab.com). They'll gladly help with your subscription renewal.")
context'is auto_renew'do
let(:auto_renew){true}
it'has a nice subject'do
expect(subject).toinclude('Something went wrong with your automatic subscription renewal')
end
it'has an expiration blocking message'do
expect(subject).toinclude("We tried to automatically renew your subscription for No Limit Records on 2020-03-01 but something went wrong so your subscription was downgraded to the free plan. Don't worry, your data is safe. We suggest you check your payment method and get in touch with our support team (support@gitlab.com). They'll gladly help with your subscription renewal.")
end
end
end
end
end
context'when it is not currently blocking changes'do
let(:plan_name){::Plan::GOLD}
context'when it is not currently blocking changes'do
expect(subject).toinclude('Your Gold subscription will expire on 2020-03-09. After that, you will not be able to create issues or merge requests as well as many other features.')
it'has a nice subject'do
expect(subject).toinclude('Your subscription will expire in 2 days')
expect(subject).toinclude("Your #{plan_name.capitalize} subscription will expire on 2020-03-09. After that, you will not be able to create issues or merge requests as well as many other features.")
expect(subject).toinclude('Your Gold subscription for No Limit Records will expire on 2020-03-09. After that, you will not be able to use merge approvals or epics as well as many security features.')
end
expect(subject).toinclude('Your Gold subscription for No Limit Records will expire on 2020-03-09. After that, you will not be able to use merge approvals or epics as well as many security features.')
expect(subject).toinclude('Your Silver subscription for No Limit Records will expire on 2020-03-09. After that, you will not be able to use merge approvals or epics as well as many other features.')
end
expect(subject).toinclude('Your Silver subscription for No Limit Records will expire on 2020-03-09. After that, you will not be able to use merge approvals or epics as well as many other features.')
expect(subject).toinclude('Your Bronze subscription for No Limit Records will expire on 2020-03-09. After that, you will not be able to use merge approvals or code quality as well as many other features.')
end
expect(subject).toinclude('Your Bronze subscription for No Limit Records will expire on 2020-03-09. After that, you will not be able to use merge approvals or code quality as well as many other features.')