aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/user_controller_spec.rb
diff options
context:
space:
mode:
authorRobin Houston <robin.houston@gmail.com>2012-01-31 16:29:04 +0000
committerRobin Houston <robin.houston@gmail.com>2012-01-31 16:29:04 +0000
commitac4587afff81177a0bf86fc0064b81538811cb29 (patch)
tree8b7e0e511a7036423dd6c7874c025dbf277ddce5 /spec/controllers/user_controller_spec.rb
parent7c6eb09daf0ad55c0286995529a82076d29fdbc8 (diff)
Load all fixtures for all tests
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.
Diffstat (limited to 'spec/controllers/user_controller_spec.rb')
-rw-r--r--spec/controllers/user_controller_spec.rb10
1 files changed, 0 insertions, 10 deletions
diff --git a/spec/controllers/user_controller_spec.rb b/spec/controllers/user_controller_spec.rb
index 4e14aeaa3..1a701ad43 100644
--- a/spec/controllers/user_controller_spec.rb
+++ b/spec/controllers/user_controller_spec.rb
@@ -8,7 +8,6 @@ require 'json'
describe UserController, "when showing a user" do
integrate_views
- fixtures :users, :public_bodies, :public_body_translations, :public_body_versions, :info_requests, :raw_emails, :incoming_messages, :outgoing_messages, :comments, :info_request_events, :track_things
before(:each) do
load_raw_emails_data
rebuild_xapian_index
@@ -68,7 +67,6 @@ end
describe UserController, "when signing in" do
integrate_views
- fixtures :users
def get_last_postredirect
post_redirects = PostRedirect.find_by_sql("select * from post_redirects order by id desc limit 1")
@@ -196,7 +194,6 @@ end
describe UserController, "when signing up" do
integrate_views
- fixtures :users
it "should be an error if you type the password differently each time" do
post :signup, { :user_signup => { :email => 'new@localhost', :name => 'New Person',
@@ -254,7 +251,6 @@ end
describe UserController, "when signing out" do
integrate_views
- fixtures :users
it "should log you out and redirect to the home page" do
session[:user_id] = users(:bob_smith_user).id
@@ -279,7 +275,6 @@ end
describe UserController, "when sending another user a message" do
integrate_views
- fixtures :users
it "should redirect to signin page if you go to the contact form and aren't signed in" do
get :contact, :id => users(:silly_name_user)
@@ -317,7 +312,6 @@ end
describe UserController, "when changing password" do
integrate_views
- fixtures :users
it "should show the email form when not logged in" do
get :signchangepassword
@@ -388,7 +382,6 @@ end
describe UserController, "when changing email address" do
integrate_views
- fixtures :users
it "should require login" do
get :signchangeemail
@@ -534,7 +527,6 @@ end
describe UserController, "when using profile photos" do
integrate_views
- fixtures :users
before do
@user = users(:bob_smith_user)
@@ -590,8 +582,6 @@ describe UserController, "when using profile photos" do
end
describe UserController, "when showing JSON version for API" do
-
- fixtures :users
it "should be successful" do
get :show, :url_name => "bob_smith", :format => "json"