diff options
author | Louise Crow <louise.crow@gmail.com> | 2013-03-19 18:56:20 -0700 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2013-03-19 18:56:20 -0700 |
commit | 56127c664a4f51e18728ed08bdf00064efee89c2 (patch) | |
tree | cd04bdcc929ea4232d44d02f51192f6459928769 /spec/controllers/admin_public_body_controller_spec.rb | |
parent | f7878a229b597b5fc7ba8172c8e8c94a8fd9d7b6 (diff) | |
parent | dc71db3f98c64fb93ac7d74b8a424f7849a33786 (diff) |
Merge branch 'develop' into rails-3-develop
Conflicts:
Gemfile
Gemfile.lock
app/views/admin_request/show.html.erb
config/environment.rb
Diffstat (limited to 'spec/controllers/admin_public_body_controller_spec.rb')
-rw-r--r-- | spec/controllers/admin_public_body_controller_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/controllers/admin_public_body_controller_spec.rb b/spec/controllers/admin_public_body_controller_spec.rb index 2070eb10c..f6c25451c 100644 --- a/spec/controllers/admin_public_body_controller_spec.rb +++ b/spec/controllers/admin_public_body_controller_spec.rb @@ -205,6 +205,19 @@ describe AdminPublicBodyController, "when administering public bodies and paying PublicBody.count.should == n - 1 end + it "doesn't let people with good emergency account credentials log in if the emergency user is disabled" do + setup_emergency_credentials('biz', 'fuz') + Configuration.stub!(:disable_emergency_user).and_return(true) + n = PublicBody.count + basic_auth_login(@request, "biz", "fuz") + post :show, { :id => public_bodies(:humpadink_public_body).id, :emergency => 1} + session[:using_admin].should == nil + n = PublicBody.count + post :destroy, { :id => public_bodies(:forlorn_public_body).id } + session[:using_admin].should == nil + PublicBody.count.should == n + end + it "allows superusers to do stuff" do session[:user_id] = users(:admin_user).id @request.env["HTTP_AUTHORIZATION"] = "" |