seiten 0.0.4 → 0.0.5

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 +1 @@
1
- 7523
1
+ 69184
@@ -0,0 +1,26 @@
1
+ require 'test_helper'
2
+
3
+ class LayoutTest < ActionDispatch::IntegrationTest
4
+
5
+ def test_returns_default_layout
6
+ visit "/about/works"
7
+ assert has_content?("Default Layout"), "not rendered default layout"
8
+ end
9
+
10
+ def test_returns_home_layout
11
+ visit "/"
12
+ assert has_content?("Home Layout"), "not rendered home layout"
13
+ end
14
+
15
+ def test_returns_inherited_layout
16
+ visit "/products/logo-design"
17
+ assert has_content?("Products Layout"), "not rendered inherited layout"
18
+ end
19
+
20
+ def test_returns_no_inherited_layout
21
+ visit "/about/our-team/switzerland"
22
+ assert has_content?("Default Layout"), "not rendered default layout"
23
+ visit "/contact"
24
+ assert has_content?("Default Layout"), "not rendered default layout"
25
+ end
26
+ end
@@ -24,11 +24,6 @@ class NavigationTest < ActionDispatch::IntegrationTest
24
24
  assert !has_content?("Kreatify")
25
25
  end
26
26
 
27
- def test_redirects_to_first_child_page
28
- visit "/about"
29
- assert_equal "/about/our-team", current_path
30
- end
31
-
32
27
  def test_returns_sub_navigation
33
28
  visit "/about/partners"
34
29
  assert has_content?("Daniel Puglisi")
@@ -55,12 +50,6 @@ class NavigationTest < ActionDispatch::IntegrationTest
55
50
  assert_equal "/products/web-development", current_path
56
51
  end
57
52
 
58
- def test_redirects_to_linked_page
59
- visit "/"
60
- click_link "Hire us"
61
- assert_equal "/contact", current_path
62
- end
63
-
64
53
  def test_returns_external_links
65
54
  visit "/about/partners"
66
55
  assert has_xpath?("//a[@href='http://danielpuglisi.com']")
@@ -0,0 +1,15 @@
1
+ require 'test_helper'
2
+
3
+ class RedirectTest < ActionDispatch::IntegrationTest
4
+
5
+ def test_redirects_to_specified_page
6
+ visit "/"
7
+ click_link "Hire us"
8
+ assert_equal "/contact", current_path
9
+ end
10
+
11
+ def test_redirects_to_first_child_page
12
+ visit "/about"
13
+ assert_equal "/about/our-team", current_path
14
+ end
15
+ end
data/test/page_test.rb CHANGED
@@ -15,6 +15,10 @@ class PageTest < Test::Unit::TestCase
15
15
  assert_equal "/", Seiten::Page.find(1).slug
16
16
  end
17
17
 
18
+ def test_returns_page_layout
19
+ assert_equal "home", Seiten::Page.find(1).layout
20
+ end
21
+
18
22
  def test_returns_parent_page
19
23
  page = Seiten::Page.find(3)
20
24
  assert_equal Seiten::Page.find(2).title, page.parent.title
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seiten
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Puglisi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-24 00:00:00.000000000 Z
11
+ date: 2013-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
- version: 3.2.13
20
- type: :development
19
+ version: 3.2.0
20
+ type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - '>='
25
25
  - !ruby/object:Gem::Version
26
- version: 3.2.13
26
+ version: 3.2.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: sqlite3
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -89,6 +89,9 @@ files:
89
89
  - test/dummy/app/pages/products/web-development.html.erb
90
90
  - test/dummy/app/pages/products.html.erb
91
91
  - test/dummy/app/views/layouts/application.html.erb
92
+ - test/dummy/app/views/layouts/home.html.erb
93
+ - test/dummy/app/views/layouts/products.html.erb
94
+ - test/dummy/app/views/layouts/team.html.erb
92
95
  - test/dummy/app/views/pages/secret.html.erb
93
96
  - test/dummy/config/application.rb
94
97
  - test/dummy/config/boot.rb
@@ -122,7 +125,9 @@ files:
122
125
  - test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705
123
126
  - test/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6
124
127
  - test/dummy/tmp/pids/server.pid
128
+ - test/integration/layout_test.rb
125
129
  - test/integration/navigation_test.rb
130
+ - test/integration/redirect_test.rb
126
131
  - test/page_test.rb
127
132
  - test/seiten_test.rb
128
133
  - test/test_helper.rb
@@ -167,6 +172,9 @@ test_files:
167
172
  - test/dummy/app/pages/products/web-development.html.erb
168
173
  - test/dummy/app/pages/products.html.erb
169
174
  - test/dummy/app/views/layouts/application.html.erb
175
+ - test/dummy/app/views/layouts/home.html.erb
176
+ - test/dummy/app/views/layouts/products.html.erb
177
+ - test/dummy/app/views/layouts/team.html.erb
170
178
  - test/dummy/app/views/pages/secret.html.erb
171
179
  - test/dummy/config/application.rb
172
180
  - test/dummy/config/boot.rb
@@ -200,7 +208,9 @@ test_files:
200
208
  - test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705
201
209
  - test/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6
202
210
  - test/dummy/tmp/pids/server.pid
211
+ - test/integration/layout_test.rb
203
212
  - test/integration/navigation_test.rb
213
+ - test/integration/redirect_test.rb
204
214
  - test/page_test.rb
205
215
  - test/seiten_test.rb
206
216
  - test/test_helper.rb