Class Dsadmin::Admind::TestController
In: lib/dsadmin/admind/test_controller.rb
Parent: AdmindController

Controller for (mainly) unit tests and for illustrating some concepts. Only active during unit tests.

Methods

Public Instance methods

[Source]

    # File lib/dsadmin/admind/test_controller.rb, line 37
37:       def auth_internal
38:       end

[Source]

    # File lib/dsadmin/admind/test_controller.rb, line 34
34:       def auth_superuser
35:       end

[Source]

    # File lib/dsadmin/admind/test_controller.rb, line 40
40:       def auth_trusted
41:       end

Needs many resources

[Source]

    # File lib/dsadmin/admind/test_controller.rb, line 70
70:       def complicated
71:       end

[Source]

    # File lib/dsadmin/admind/test_controller.rb, line 47
47:       def forbidden
48:         unless(request.data && (request.data['location'] == 'partyroom'))
49:           raise SecurityError.new("Hey! Gimme some privacy, will ya?!")
50:         end
51:       end

For testing ACL checks

[Source]

    # File lib/dsadmin/admind/test_controller.rb, line 66
66:       def mock
67:       end

For testing params_for

[Source]

    # File lib/dsadmin/admind/test_controller.rb, line 78
78:       def more_params
79:       end

For testing ACL checks

[Source]

    # File lib/dsadmin/admind/test_controller.rb, line 62
62:       def no_admins
63:       end

[Source]

    # File lib/dsadmin/admind/test_controller.rb, line 85
85:       def not_an_action(it, has, parameters)
86:       end

[Source]

    # File lib/dsadmin/admind/test_controller.rb, line 54
54:       def not_found
55:         unless(request.data && (request.data['id'] == 1))
56:           raise IndexError.new("Nah, ain't not knowin' dat")
57:         end
58:       end

[Source]

    # File lib/dsadmin/admind/test_controller.rb, line 81
81:       def returns_data
82:         respond 'message' => "Hi, loser", 'answer' => 42
83:       end

[Source]

    # File lib/dsadmin/admind/test_controller.rb, line 43
43:       def unsupported
44:         # FIXME: throw "unsupported"
45:       end

For testing params_for

[Source]

    # File lib/dsadmin/admind/test_controller.rb, line 74
74:       def with_params
75:       end

Protected Instance methods

[Source]

    # File lib/dsadmin/admind/test_controller.rb, line 91
91:       def hidden_thingy
92:       end

[Validate]