stripe_saas 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,50 +0,0 @@
1
- require 'rails_helper'
2
-
3
- describe StripeSaas::Plan do
4
- describe '#is_upgrade_from?' do
5
-
6
- it 'returns true if the price is higher' do
7
- plan = Plan.new
8
- plan.price = 123.23
9
- cheaper_plan = Plan.new
10
- cheaper_plan.price = 61.61
11
- expect(plan.is_upgrade_from?(cheaper_plan)).to be true
12
- end
13
-
14
- it 'returns true if the price is the same' do
15
- plan = Plan.new
16
- plan.price = 123.23
17
- expect(plan.is_upgrade_from?(plan)).to be true
18
- end
19
-
20
- it 'returns false if the price is the same or higher' do
21
- plan = Plan.new
22
- plan.price = 61.61
23
- more_expensive_plan = Plan.new
24
- more_expensive_plan.price = 123.23
25
- expect(plan.is_upgrade_from?(more_expensive_plan)).to be false
26
- end
27
-
28
- it 'handles a nil value gracefully' do
29
- plan = Plan.new
30
- plan.price = 123.23
31
- cheaper_plan = Plan.new
32
-
33
- expect(plan.is_upgrade_from?(cheaper_plan)).to be true
34
- end
35
-
36
- it 'returns whether the plan is a free plan' do
37
- plan = Plan.new
38
- plan.price = 0.0
39
- expect(plan).to be_free
40
- end
41
-
42
- end
43
-
44
- describe 'plan features' do
45
- # before {
46
- # feature_a = Feature.new
47
- # feature_b = Feature.new
48
- # }
49
- end
50
- end
@@ -1,170 +0,0 @@
1
-  (1.1ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
2
-  (0.5ms) select sqlite_version(*)
3
-  (1.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
4
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
5
- Migrating to DeviseCreateUsers (20150101233243)
6
-  (0.1ms) begin transaction
7
- DEPRECATION WARNING: `#timestamp` was called without specifying an option for `null`. In Rails 5, this behavior will change to `null: false`. You should manually specify `null: true` to prevent the behavior of your existing migrations from changing. (called from block in change at /Users/bsb/Projects/integrallis-open-source/stripe_saas/spec/dummy/db/migrate/20150101233243_devise_create_users.rb:34)
8
-  (1.1ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar DEFAULT '' NOT NULL, "encrypted_password" varchar DEFAULT '' NOT NULL, "reset_password_token" varchar, "reset_password_sent_at" datetime, "remember_created_at" datetime, "sign_in_count" integer DEFAULT 0 NOT NULL, "current_sign_in_at" datetime, "last_sign_in_at" datetime, "current_sign_in_ip" varchar, "last_sign_in_ip" varchar, "created_at" datetime, "updated_at" datetime)
9
-  (1.4ms) CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
10
-  (0.1ms) SELECT sql
11
- FROM sqlite_master
12
- WHERE name='index_users_on_email' AND type='index'
13
- UNION ALL
14
- SELECT sql
15
- FROM sqlite_temp_master
16
- WHERE name='index_users_on_email' AND type='index'
17
-
18
-  (0.2ms) CREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")
19
- SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150101233243"]]
20
-  (1.1ms) commit transaction
21
- Migrating to CreateSubscriptions (20150102001921)
22
-  (0.1ms) begin transaction
23
-  (0.4ms) CREATE TABLE "subscriptions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "stripe_id" varchar, "plan_id" integer, "last_four" varchar, "card_type" varchar, "current_price_cents" integer, "user_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
24
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150102001921"]]
25
-  (0.8ms) commit transaction
26
- Migrating to CreatePlans (20150102001930)
27
-  (0.1ms) begin transaction
28
-  (0.4ms) CREATE TABLE "plans" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "stripe_id" varchar, "price_cents" integer, "interval" varchar, "features" text, "highlight" boolean, "display_order" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
29
- SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150102001930"]]
30
-  (0.8ms) commit transaction
31
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
32
-  (0.1ms)  SELECT sql
33
- FROM sqlite_master
34
- WHERE name='index_users_on_reset_password_token' AND type='index'
35
- UNION ALL
36
- SELECT sql
37
- FROM sqlite_temp_master
38
- WHERE name='index_users_on_reset_password_token' AND type='index'
39
- 
40
-  (0.1ms) SELECT sql
41
- FROM sqlite_master
42
- WHERE name='index_users_on_email' AND type='index'
43
- UNION ALL
44
- SELECT sql
45
- FROM sqlite_temp_master
46
- WHERE name='index_users_on_email' AND type='index'
47
-
48
- ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"
49
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
50
- Migrating to CreatePlans (20150102001930)
51
-  (0.1ms) begin transaction
52
-  (2.4ms) DROP TABLE "plans"
53
- SQL (0.3ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = ? [["version", "20150102001930"]]
54
-  (1.0ms) commit transaction
55
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
56
-  (0.2ms) SELECT sql
57
- FROM sqlite_master
58
- WHERE name='index_users_on_reset_password_token' AND type='index'
59
- UNION ALL
60
- SELECT sql
61
- FROM sqlite_temp_master
62
- WHERE name='index_users_on_reset_password_token' AND type='index'
63
-
64
-  (0.2ms)  SELECT sql
65
- FROM sqlite_master
66
- WHERE name='index_users_on_email' AND type='index'
67
- UNION ALL
68
- SELECT sql
69
- FROM sqlite_temp_master
70
- WHERE name='index_users_on_email' AND type='index'
71
- 
72
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
73
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
74
- Migrating to CreateSubscriptions (20150102001921)
75
-  (0.1ms) begin transaction
76
-  (0.5ms) DROP TABLE "subscriptions"
77
- SQL (0.3ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = ? [["version", "20150102001921"]]
78
-  (0.9ms) commit transaction
79
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
80
-  (0.3ms) SELECT sql
81
- FROM sqlite_master
82
- WHERE name='index_users_on_reset_password_token' AND type='index'
83
- UNION ALL
84
- SELECT sql
85
- FROM sqlite_temp_master
86
- WHERE name='index_users_on_reset_password_token' AND type='index'
87
-
88
-  (0.2ms)  SELECT sql
89
- FROM sqlite_master
90
- WHERE name='index_users_on_email' AND type='index'
91
- UNION ALL
92
- SELECT sql
93
- FROM sqlite_temp_master
94
- WHERE name='index_users_on_email' AND type='index'
95
- 
96
- ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"
97
- Migrating to CreateSubscriptions (20150102001921)
98
-  (0.1ms) begin transaction
99
-  (0.9ms) CREATE TABLE "subscriptions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "stripe_id" varchar, "plan_id" integer, "last_four" varchar, "card_type" varchar, "current_price_cents" integer, "user_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
100
- SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150102001921"]]
101
-  (0.9ms) commit transaction
102
- Migrating to CreatePlans (20150102001930)
103
-  (0.1ms) begin transaction
104
-  (0.4ms) CREATE TABLE "plans" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "stripe_id" varchar, "name" varchar, "price_cents" integer, "interval" varchar, "interval_count" integer, "trial_period_days" integer, "metadata_as_json" text, "features_as_json" text, "highlight" boolean, "display_order" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
105
- SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150102001930"]]
106
-  (1.1ms) commit transaction
107
- ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
108
-  (0.3ms)  SELECT sql
109
- FROM sqlite_master
110
- WHERE name='index_users_on_reset_password_token' AND type='index'
111
- UNION ALL
112
- SELECT sql
113
- FROM sqlite_temp_master
114
- WHERE name='index_users_on_reset_password_token' AND type='index'
115
- 
116
-  (0.4ms) SELECT sql
117
- FROM sqlite_master
118
- WHERE name='index_users_on_email' AND type='index'
119
- UNION ALL
120
- SELECT sql
121
- FROM sqlite_temp_master
122
- WHERE name='index_users_on_email' AND type='index'
123
-
124
- ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
125
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
126
- Migrating to CreatePlans (20150102001930)
127
-  (0.1ms) begin transaction
128
-  (1.2ms) DROP TABLE "plans"
129
- SQL (0.2ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = ? [["version", "20150102001930"]]
130
-  (0.8ms) commit transaction
131
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
132
-  (0.1ms) SELECT sql
133
- FROM sqlite_master
134
- WHERE name='index_users_on_reset_password_token' AND type='index'
135
- UNION ALL
136
- SELECT sql
137
- FROM sqlite_temp_master
138
- WHERE name='index_users_on_reset_password_token' AND type='index'
139
-
140
-  (0.1ms)  SELECT sql
141
- FROM sqlite_master
142
- WHERE name='index_users_on_email' AND type='index'
143
- UNION ALL
144
- SELECT sql
145
- FROM sqlite_temp_master
146
- WHERE name='index_users_on_email' AND type='index'
147
- 
148
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
149
- Migrating to CreatePlans (20150102001930)
150
-  (0.1ms) begin transaction
151
-  (0.6ms) CREATE TABLE "plans" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "stripe_id" varchar, "name" varchar, "price_cents" integer, "interval" varchar, "interval_count" integer, "trial_period_days" integer, "metadata_as_json" text, "statement_descriptor" text, "features_as_json" text, "highlight" boolean, "display_order" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
152
- SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150102001930"]]
153
-  (0.9ms) commit transaction
154
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
155
-  (0.1ms)  SELECT sql
156
- FROM sqlite_master
157
- WHERE name='index_users_on_reset_password_token' AND type='index'
158
- UNION ALL
159
- SELECT sql
160
- FROM sqlite_temp_master
161
- WHERE name='index_users_on_reset_password_token' AND type='index'
162
- 
163
-  (0.1ms) SELECT sql
164
- FROM sqlite_master
165
- WHERE name='index_users_on_email' AND type='index'
166
- UNION ALL
167
- SELECT sql
168
- FROM sqlite_temp_master
169
- WHERE name='index_users_on_email' AND type='index'
170
-
@@ -1,9 +0,0 @@
1
- # require 'test_helper'
2
- #
3
- # class NavigationTest < ActionDispatch::IntegrationTest
4
- # fixtures :all
5
- #
6
- # # test "the truth" do
7
- # # assert true
8
- # # end
9
- # end