forest_liana 1.7.8 → 1.7.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,134 @@
1
+ #require 'rails_helper'
2
+
3
+ module ForestLiana
4
+ class RouteTest < ActiveSupport::TestCase
5
+ include ActionDispatch::Assertions::RoutingAssertions
6
+
7
+ test "Routes" do
8
+ @routes = ForestLiana::Engine.routes
9
+
10
+ # Onboarding
11
+ assert_routing({
12
+ method: 'get', path: '/'
13
+ }, {
14
+ controller: 'forest_liana/apimaps', action: 'index'
15
+ })
16
+
17
+ # Session
18
+ assert_routing({
19
+ method: 'post', path: 'sessions'
20
+ }, {
21
+ controller: 'forest_liana/sessions', action: 'create'
22
+ })
23
+
24
+ # Associations
25
+ assert_routing({
26
+ method: 'get', path: ':collection/:id/relationships/:association_name'
27
+ }, {
28
+ controller: 'forest_liana/associations', action: 'index',
29
+ collection: ':collection', id: ':id', association_name: ':association_name'
30
+ })
31
+ assert_routing({
32
+ method: 'put', path: ':collection/:id/relationships/:association_name'
33
+ }, {
34
+ controller: 'forest_liana/associations', action: 'update',
35
+ collection: ':collection', id: ':id', association_name: ':association_name'
36
+ })
37
+ assert_routing({
38
+ method: 'post', path: ':collection/:id/relationships/:association_name'
39
+ }, {
40
+ controller: 'forest_liana/associations', action: 'associate',
41
+ collection: ':collection', id: ':id', association_name: ':association_name'
42
+ })
43
+ assert_routing({
44
+ method: 'delete', path: ':collection/:id/relationships/:association_name'
45
+ }, {
46
+ controller: 'forest_liana/associations', action: 'dissociate',
47
+ collection: ':collection', id: ':id', association_name: ':association_name'
48
+ })
49
+
50
+ # Stats
51
+ assert_routing({
52
+ method: 'post', path: '/stats/:collection'
53
+ }, {
54
+ controller: 'forest_liana/stats', action: 'show', collection: ':collection'
55
+ })
56
+
57
+ # Stripe Integration
58
+ assert_routing({
59
+ method: 'get', path: '(:collection)_stripe_payments'
60
+ }, {
61
+ controller: 'forest_liana/stripe', action: 'payments',
62
+ collection: '(:collection)'
63
+ })
64
+ assert_routing({
65
+ method: 'get', path: ':collection/:id/stripe_payments'
66
+ }, {
67
+ controller: 'forest_liana/stripe', action: 'payments',
68
+ collection: ':collection', id: ':id'
69
+ })
70
+ assert_routing({
71
+ method: 'post', path: 'stripe_payments/refunds'
72
+ }, {
73
+ controller: 'forest_liana/stripe', action: 'refund'
74
+ })
75
+ assert_routing({
76
+ method: 'get', path: '(:collection)_stripe_invoices'
77
+ }, {
78
+ controller: 'forest_liana/stripe', action: 'invoices',
79
+ collection: '(:collection)'
80
+ })
81
+ assert_routing({
82
+ method: 'get', path: ':collection/:id/stripe_invoices'
83
+ }, {
84
+ controller: 'forest_liana/stripe', action: 'invoices',
85
+ collection: ':collection', id: ':id'
86
+ })
87
+ assert_routing({
88
+ method: 'get', path: ':collection/:id/stripe_cards'
89
+ }, {
90
+ controller: 'forest_liana/stripe', action: 'cards',
91
+ collection: ':collection', id: ':id'
92
+ })
93
+ assert_routing({
94
+ method: 'get', path: '(:collection)_stripe_subscriptions'
95
+ }, {
96
+ controller: 'forest_liana/stripe', action: 'subscriptions',
97
+ collection: '(:collection)'
98
+ })
99
+ assert_routing({
100
+ method: 'get', path: ':collection/:id/stripe_subscriptions'
101
+ }, {
102
+ controller: 'forest_liana/stripe', action: 'subscriptions',
103
+ collection: ':collection', id: ':id'
104
+ })
105
+ assert_routing({
106
+ method: 'get', path: ':collection/:id/stripe_bank_accounts'
107
+ }, {
108
+ controller: 'forest_liana/stripe', action: 'bank_accounts',
109
+ collection: ':collection', id: ':id'
110
+ })
111
+
112
+ # Intercom Integration
113
+ assert_routing({
114
+ method: 'get', path: ':collection/:id/intercom_conversations'
115
+ }, {
116
+ controller: 'forest_liana/intercom', action: 'user_conversations',
117
+ collection: ':collection', id: ':id'
118
+ })
119
+ assert_routing({
120
+ method: 'get', path: ':collection/:id/intercom_attributes'
121
+ }, {
122
+ controller: 'forest_liana/intercom', action: 'attributes',
123
+ collection: ':collection', id: ':id'
124
+ })
125
+
126
+ # Devise support
127
+ assert_routing({
128
+ method: 'post', path: '/actions/change-password'
129
+ }, {
130
+ controller: 'forest_liana/devise', action: 'change_password'
131
+ })
132
+ end
133
+ end
134
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: forest_liana
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.8
4
+ version: 1.7.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sandro Munda
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-07 00:00:00.000000000 Z
11
+ date: 2017-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -290,6 +290,7 @@ files:
290
290
  - test/fixtures/tree.yml
291
291
  - test/forest_liana_test.rb
292
292
  - test/integration/navigation_test.rb
293
+ - test/routing/route_test.rb
293
294
  - test/services/forest_liana/has_many_getter_test.rb
294
295
  - test/services/forest_liana/pie_stat_getter_test.rb
295
296
  - test/services/forest_liana/resource_updater_test.rb
@@ -317,7 +318,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
317
318
  version: '0'
318
319
  requirements: []
319
320
  rubyforge_project:
320
- rubygems_version: 2.6.12
321
+ rubygems_version: 2.5.1
321
322
  signing_key:
322
323
  specification_version: 4
323
324
  summary: Official Rails Liana for Forest
@@ -404,6 +405,7 @@ test_files:
404
405
  - test/fixtures/tree.yml
405
406
  - test/forest_liana_test.rb
406
407
  - test/integration/navigation_test.rb
408
+ - test/routing/route_test.rb
407
409
  - test/services/forest_liana/has_many_getter_test.rb
408
410
  - test/services/forest_liana/pie_stat_getter_test.rb
409
411
  - test/services/forest_liana/resource_updater_test.rb