Class: SystemSettingsTest
- Inherits:
-
Test::Unit::TestCase
- Object
- Test::Unit::TestCase
- SystemSettingsTest
show all
- Includes:
- Goldberg::TestHelper
- Defined in:
- lib/six-updater-web/vendor/plugins/goldberg/test/unit/system_settings_test.rb
Instance Method Summary
collapse
#form_login, #form_logout, included, #login_user
Instance Method Details
#test_not_found_page ⇒ Object
29
30
31
32
|
# File 'lib/six-updater-web/vendor/plugins/goldberg/test/unit/system_settings_test.rb', line 29
def test_not_found_page
page = Goldberg::ContentPage.find :first
ss = Goldberg::SystemSettings.create(:not_found_page_id => page.id)
end
|
#test_not_found_page_raises_when_page_not_found ⇒ Object
35
36
37
38
|
# File 'lib/six-updater-web/vendor/plugins/goldberg/test/unit/system_settings_test.rb', line 35
def test_not_found_page_raises_when_page_not_found
ss = Goldberg::SystemSettings.create
assert_raise(ActiveRecord::RecordNotFound) {ss.not_found_page}
end
|
#test_permission_denied_page ⇒ Object
41
42
43
44
|
# File 'lib/six-updater-web/vendor/plugins/goldberg/test/unit/system_settings_test.rb', line 41
def test_permission_denied_page
page = Goldberg::ContentPage.find :first
ss = Goldberg::SystemSettings.create(:permission_denied_page_id => page.id)
end
|
#test_permission_denied_page_raises_when_page_permission_denied ⇒ Object
47
48
49
50
|
# File 'lib/six-updater-web/vendor/plugins/goldberg/test/unit/system_settings_test.rb', line 47
def test_permission_denied_page_raises_when_page_permission_denied
ss = Goldberg::SystemSettings.create
assert_raise(ActiveRecord::RecordNotFound) {ss.permission_denied_page}
end
|
#test_public_role ⇒ Object
6
7
8
9
10
|
# File 'lib/six-updater-web/vendor/plugins/goldberg/test/unit/system_settings_test.rb', line 6
def test_public_role
public_role = Goldberg::Role.find :first
ss = Goldberg::SystemSettings.create(:public_role_id => public_role.id)
assert_equal(public_role, ss.public_role)
end
|
#test_public_role_raises_when_role_not_found ⇒ Object
12
13
14
15
|
# File 'lib/six-updater-web/vendor/plugins/goldberg/test/unit/system_settings_test.rb', line 12
def test_public_role_raises_when_role_not_found
ss = Goldberg::SystemSettings.create
assert_raise(ActiveRecord::RecordNotFound) {ss.public_role}
end
|
#test_session_expired_page ⇒ Object
53
54
55
56
|
# File 'lib/six-updater-web/vendor/plugins/goldberg/test/unit/system_settings_test.rb', line 53
def test_session_expired_page
page = Goldberg::ContentPage.find :first
ss = Goldberg::SystemSettings.create(:session_expired_page_id => page.id)
end
|
#test_session_expired_page_raises_when_page_session_expired ⇒ Object
59
60
61
62
|
# File 'lib/six-updater-web/vendor/plugins/goldberg/test/unit/system_settings_test.rb', line 59
def test_session_expired_page_raises_when_page_session_expired
ss = Goldberg::SystemSettings.create
assert_raise(ActiveRecord::RecordNotFound) {ss.session_expired_page}
end
|
#test_site_default_page ⇒ Object
17
18
19
20
|
# File 'lib/six-updater-web/vendor/plugins/goldberg/test/unit/system_settings_test.rb', line 17
def test_site_default_page
page = Goldberg::ContentPage.find :first
ss = Goldberg::SystemSettings.create(:site_default_page_id => page.id)
end
|
#test_site_default_page_raises_when_page_not_found ⇒ Object
23
24
25
26
|
# File 'lib/six-updater-web/vendor/plugins/goldberg/test/unit/system_settings_test.rb', line 23
def test_site_default_page_raises_when_page_not_found
ss = Goldberg::SystemSettings.create
assert_raise(ActiveRecord::RecordNotFound) {ss.site_default_page}
end
|
#test_system_pages_returns_nil_when_tested_page_not_system_page ⇒ Object
65
66
67
68
69
|
# File 'lib/six-updater-web/vendor/plugins/goldberg/test/unit/system_settings_test.rb', line 65
def test_system_pages_returns_nil_when_tested_page_not_system_page
ss = Goldberg::SystemSettings.create
page = Goldberg::ContentPage.find :first
assert_nil(ss.system_pages(page.id))
end
|