aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/OIDC/Lite/Client/WebServer
diff options
context:
space:
mode:
authorDave Arter <davea@mysociety.org>2017-01-18 14:32:19 +0000
committerDave Arter <davea@mysociety.org>2017-02-15 17:34:38 +0000
commit71e4186cefa356f240870cd5edf0e15b27e5e044 (patch)
tree035ee91ed97e48dda3efdfc478ed48149ec1f143 /perllib/OIDC/Lite/Client/WebServer
parentbb99a8917a9b7fc38f0c0847f45c68659791b54a (diff)
Clarify ‘inspected’ behaviour
A report is now considered 'inspected' if its state was changed by an inspector. Additionally, an AdminLog entry is created so the time of inspection and inspector can be recorded.
Diffstat (limited to 'perllib/OIDC/Lite/Client/WebServer')
0 files changed, 0 insertions, 0 deletions
/option> Unnamed repository; edit this file 'description' to name the repository.MimesBrønn
aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/admin_user_controller_spec.rb
blob: cf3665c9f60b0c60f4bb9c5f4a361b6c438bffad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

describe AdminUserController, "when administering users" do
    integrate_views
  
    it "shows the index/list page" do
        get :index
    end

    it "searches for 'bob'" do
        get :list, :query => "bob"
        assigns[:admin_users].should == [ users(:bob_smith_user) ]
    end

    it "shows a user" do
        get :show, :id => users(:bob_smith_user)
    end
    
    it "logs in as another user" do
        get :login_as,  :id => users(:bob_smith_user).id
        post_redirect = PostRedirect.get_last_post_redirect
        response.should redirect_to(:controller => 'user', :action => 'confirm', :email_token => post_redirect.email_token)
    end
    
    # See also "allows an admin to log in as another user" in spec/integration/admin_spec.rb
end