mirror of
https://github.com/discourse/discourse-subscriptions.git
synced 2025-07-08 07:12:46 +00:00
DEV: Fix tests after changes to controllers
This commit is contained in:
parent
9c46794e80
commit
d360a4155d
@ -48,6 +48,8 @@ module DiscourseSubscriptions
|
|||||||
|
|
||||||
describe 'index' do
|
describe 'index' do
|
||||||
it "gets the empty products" do
|
it "gets the empty products" do
|
||||||
|
SiteSetting.discourse_subscriptions_public_key = "public-key"
|
||||||
|
SiteSetting.discourse_subscriptions_secret_key = "secret-key"
|
||||||
get "/s/admin/products.json"
|
get "/s/admin/products.json"
|
||||||
expect(response.parsed_body).to be_empty
|
expect(response.parsed_body).to be_empty
|
||||||
end
|
end
|
||||||
|
@ -35,6 +35,8 @@ module DiscourseSubscriptions
|
|||||||
|
|
||||||
describe "index" do
|
describe "index" do
|
||||||
it "gets the subscriptions and products" do
|
it "gets the subscriptions and products" do
|
||||||
|
SiteSetting.discourse_subscriptions_public_key = "public-key"
|
||||||
|
SiteSetting.discourse_subscriptions_secret_key = "secret-key"
|
||||||
::Stripe::Subscription.expects(:list).with(expand: ['data.plan.product']).returns(
|
::Stripe::Subscription.expects(:list).with(expand: ['data.plan.product']).returns(
|
||||||
[
|
[
|
||||||
{ id: "sub_12345" },
|
{ id: "sub_12345" },
|
||||||
|
@ -19,6 +19,8 @@ module DiscourseSubscriptions
|
|||||||
|
|
||||||
before do
|
before do
|
||||||
Fabricate(:product, external_id: "prodct_23456")
|
Fabricate(:product, external_id: "prodct_23456")
|
||||||
|
SiteSetting.discourse_subscriptions_public_key = "public-key"
|
||||||
|
SiteSetting.discourse_subscriptions_secret_key = "secret-key"
|
||||||
end
|
end
|
||||||
|
|
||||||
context "unauthenticated" do
|
context "unauthenticated" do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user