aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/admin_user_controller_spec.rb
Commit message (Collapse)AuthorAgeLines
* Use RESTful routes for CRUD admin user actionsLouise Crow2014-12-18-5/+5
|
* Add specs for AdminUserController#modify_comment_visibilityGareth Rees2014-03-25-0/+69
|
* Add a can_make_batch_requests flag to user modelLouise Crow2013-12-04-2/+21
| | | | Make it updatable via the user admin page.
* integrate_views is render_views RSpec 2Henare Degan2012-12-11-1/+1
|
* Fix test breakage introduced in 8d78cb8844549dc901cd901371be6ec604fb7f68Seb Bacon2012-05-15-3/+0
|
* Fix the "log in as" functionRobin Houston2012-03-20-8/+2
| | | | | | | | | | | | | | | Previously the "log in as" function after 3b6e5a692b852a88f55b21a7210f60a6f7cfc24b would attempt to log the admin user out before issuing the redirect. Unfortunately this approach does not work on WhatDoTheyKnow, where the admin pages are served via a different domain (secure.mysociety.org) and so do not share session information with the rest of the site. This commit changes it to mark the PostRedirect with circumstance == "login_as", which signals the user controller to log out the previous user even if they are an admin. In other words, the user is logged out on the main site rather than the admin site, skirting this problem. Closes #450.
* Let admin users use auto-login URLsRobin Houston2012-02-06-1/+16
| | | | | | Don't change logged-in user from an admin when visiting a auto-login URL. Closes #306.
* Load all fixtures for all testsRobin Houston2012-01-31-1/+0
| | | | | | | | | The ad hoc specification of fixtures has been an ongoing source of bugs in the tests. The straw that broke the camel’s back is that 7c6eb09 requires the fixtures to be loaded in order (i.e. children before their parents), and it would have been a painful process to reorder all the dozens of different fixture lists, but the test system ought to be more reliable this way.
* Add missing fixturesRobin Houston2012-01-23-1/+1
| | | | | | | | | | | | | | | | | | Without this addition, the "shows a user" test would fail unless run in a context where the public body fixtures had already been loaded, with an error like this: ActionView::TemplateError in 'AdminUserController when administering users shows a user' undefined method `name' for nil:NilClass On line #14 of app/views/admin_request/_some_requests.rhtml 11: <% for info_request in info_requests %> 12: <tr class="<%= cycle('odd', 'even') %>"> 13: <td><%= request_both_links(info_request) %></td> 14: <td><%= public_body_both_links(info_request.public_body) %></td> 15: <td><%= user_both_links(info_request.user) %></td> 16: <% for column in InfoRequest.content_columns.map { |c| c.name } - [ "title", "url_title" ] %> 17: <td><%=h info_request.send(column) %></td>
* allow specs to run independentlyJames McKinney2011-10-16-1/+1
|
* Make the tests work with authenticationRobin Houston2011-07-13-0/+1
|
* Make path work in Ruby 1.9Francis Irving2010-09-15-1/+1
|
* Test code for more admin stuff, and help pages, and related HTML fixes.francis2008-03-21-0/+21