crumbs 1.0.9 → 1.1.0
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.
- checksums.yaml +4 -4
- data/MIT-LICENSE +1 -1
- data/lib/crumbs/action_controller/base.rb +26 -33
- data/lib/crumbs/version.rb +1 -1
- data/test/dummy/config/application.rb +2 -2
- data/test/dummy/log/test.log +14287 -0
- data/test/with_last_test.rb +26 -13
- metadata +2 -2
data/test/with_last_test.rb
CHANGED
@@ -11,7 +11,8 @@ class WithLastTest < ActionDispatch::IntegrationTest
|
|
11
11
|
assert_equal [
|
12
12
|
{ base_url: 'http://www.example.com', path: '/', fullpath: '/' }
|
13
13
|
], session[:referers]
|
14
|
-
assert_select 'a',
|
14
|
+
assert_select 'a', count: 1
|
15
|
+
assert_select 'a[href="/"]', 'Home'
|
15
16
|
|
16
17
|
get '/static'
|
17
18
|
assert_equal [
|
@@ -37,7 +38,8 @@ class WithLastTest < ActionDispatch::IntegrationTest
|
|
37
38
|
assert_equal [
|
38
39
|
{ base_url: 'http://www.example.com', path: '/', fullpath: '/' }
|
39
40
|
], session[:referers]
|
40
|
-
assert_select 'a',
|
41
|
+
assert_select 'a', count: 1
|
42
|
+
assert_select 'a[href="/"]', 'Home'
|
41
43
|
end
|
42
44
|
|
43
45
|
test "should remember last request with parameters in the same path" do
|
@@ -45,7 +47,8 @@ class WithLastTest < ActionDispatch::IntegrationTest
|
|
45
47
|
assert_equal [
|
46
48
|
{ base_url: 'http://www.example.com', path: '/', fullpath: '/?p1=p1' }
|
47
49
|
], session[:referers]
|
48
|
-
assert_select 'a',
|
50
|
+
assert_select 'a', count: 1
|
51
|
+
assert_select 'a[href="/?p1=p1"]', 'Home'
|
49
52
|
|
50
53
|
get '/static?p2=p2'
|
51
54
|
assert_equal [
|
@@ -71,7 +74,8 @@ class WithLastTest < ActionDispatch::IntegrationTest
|
|
71
74
|
assert_equal [
|
72
75
|
{ base_url: 'http://www.example.com', path: '/', fullpath: '/' }
|
73
76
|
], session[:referers]
|
74
|
-
assert_select 'a',
|
77
|
+
assert_select 'a', count: 1
|
78
|
+
assert_select 'a[href="/"]', 'Home'
|
75
79
|
end
|
76
80
|
|
77
81
|
test "gaps should not cause any error and should generate crumbs either" do
|
@@ -79,7 +83,8 @@ class WithLastTest < ActionDispatch::IntegrationTest
|
|
79
83
|
assert_equal [
|
80
84
|
{ base_url: 'http://www.example.com', path: '/', fullpath: '/?p1=p1' }
|
81
85
|
], session[:referers]
|
82
|
-
assert_select 'a',
|
86
|
+
assert_select 'a', count: 1
|
87
|
+
assert_select 'a[href="/?p1=p1"]', 'Home'
|
83
88
|
|
84
89
|
get '/static/nested?p3=p3'
|
85
90
|
assert_equal [
|
@@ -95,7 +100,8 @@ class WithLastTest < ActionDispatch::IntegrationTest
|
|
95
100
|
assert_equal [
|
96
101
|
{ base_url: 'http://www.example.com', path: '/', fullpath: '/' }
|
97
102
|
], session[:referers]
|
98
|
-
assert_select 'a',
|
103
|
+
assert_select 'a', count: 1
|
104
|
+
assert_select 'a[href="/"]', 'Home'
|
99
105
|
end
|
100
106
|
|
101
107
|
test "empty crumbs should not cause any error and should not generate crumbs" do
|
@@ -103,7 +109,8 @@ class WithLastTest < ActionDispatch::IntegrationTest
|
|
103
109
|
assert_equal [
|
104
110
|
{ base_url: 'http://www.example.com', path: '/', fullpath: '/?p1=p1' }
|
105
111
|
], session[:referers]
|
106
|
-
assert_select 'a',
|
112
|
+
assert_select 'a', count: 1
|
113
|
+
assert_select 'a[href="/?p1=p1"]', 'Home'
|
107
114
|
|
108
115
|
get '/empty?p2=p2'
|
109
116
|
assert_equal [
|
@@ -127,7 +134,8 @@ class WithLastTest < ActionDispatch::IntegrationTest
|
|
127
134
|
assert_equal [
|
128
135
|
{ base_url: 'http://www.example.com', path: '/', fullpath: '/' }
|
129
136
|
], session[:referers]
|
130
|
-
assert_select 'a',
|
137
|
+
assert_select 'a', count: 1
|
138
|
+
assert_select 'a[href="/"]', 'Home'
|
131
139
|
end
|
132
140
|
|
133
141
|
test "params should not cause any error and can be use alter crumb name" do
|
@@ -135,7 +143,8 @@ class WithLastTest < ActionDispatch::IntegrationTest
|
|
135
143
|
assert_equal [
|
136
144
|
{ base_url: 'http://www.example.com', path: '/', fullpath: '/?p1=p1' }
|
137
145
|
], session[:referers]
|
138
|
-
assert_select 'a',
|
146
|
+
assert_select 'a', count: 1
|
147
|
+
assert_select 'a[href="/?p1=p1"]', 'Home'
|
139
148
|
|
140
149
|
get '/param?p2=p2'
|
141
150
|
assert_equal [
|
@@ -174,7 +183,8 @@ class WithLastTest < ActionDispatch::IntegrationTest
|
|
174
183
|
assert_equal [
|
175
184
|
{ base_url: 'http://www.example.com', path: '/', fullpath: '/' }
|
176
185
|
], session[:referers]
|
177
|
-
assert_select 'a',
|
186
|
+
assert_select 'a', count: 1
|
187
|
+
assert_select 'a[href="/"]', 'Home'
|
178
188
|
end
|
179
189
|
|
180
190
|
test "going back should not cause any error and should retain history" do
|
@@ -182,7 +192,8 @@ class WithLastTest < ActionDispatch::IntegrationTest
|
|
182
192
|
assert_equal [
|
183
193
|
{ base_url: 'http://www.example.com', path: '/', fullpath: '/?p1=p1' }
|
184
194
|
], session[:referers]
|
185
|
-
assert_select 'a',
|
195
|
+
assert_select 'a', count: 1
|
196
|
+
assert_select 'a[href="/?p1=p1"]', 'Home'
|
186
197
|
|
187
198
|
get '/param?p2=p2'
|
188
199
|
assert_equal [
|
@@ -232,7 +243,8 @@ class WithLastTest < ActionDispatch::IntegrationTest
|
|
232
243
|
assert_equal [
|
233
244
|
{ base_url: 'http://www.example.com', path: '/', fullpath: '/?p1=p1' }
|
234
245
|
], session[:referers]
|
235
|
-
assert_select 'a',
|
246
|
+
assert_select 'a', count: 1
|
247
|
+
assert_select 'a[href="/?p1=p1"]', 'Home'
|
236
248
|
|
237
249
|
get '/i18n?p2=p2'
|
238
250
|
assert_equal [
|
@@ -258,7 +270,8 @@ class WithLastTest < ActionDispatch::IntegrationTest
|
|
258
270
|
assert_equal [
|
259
271
|
{ base_url: 'http://www.example.com', path: '/', fullpath: '/?p1=p1' }
|
260
272
|
], session[:referers]
|
261
|
-
assert_select 'a',
|
273
|
+
assert_select 'a', count: 1
|
274
|
+
assert_select 'a[href="/?p1=p1"]', 'Home'
|
262
275
|
end
|
263
276
|
|
264
277
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: crumbs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Museways
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|