user_impersonate2 0.9.2 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -463,3 +463,1591 @@ Processing by HomeController#index as HTML
463
463
  Rendered home/index.html.erb within layouts/application (1.5ms)
464
464
  Completed 200 OK in 2ms (Views: 2.1ms | ActiveRecord: 0.2ms)
465
465
   (0.2ms) rollback transaction
466
+  (0.6ms) begin transaction
467
+ -------------------------------------------------------------------------------------
468
+ UserImpersonate::ImpersonateControllerTest: test_create_should_require_authentication
469
+ -------------------------------------------------------------------------------------
470
+ Processing by UserImpersonate::ImpersonateController#create as HTML
471
+ Completed 401 Unauthorized in 10ms
472
+ Rendered text template (0.0ms)
473
+  (0.1ms) rollback transaction
474
+  (0.1ms) begin transaction
475
+ ------------------------------------------------------------------------------------------
476
+ UserImpersonate::ImpersonateControllerTest: test_destroy_should_not_require_authentication
477
+ ------------------------------------------------------------------------------------------
478
+ Processing by UserImpersonate::ImpersonateController#destroy as HTML
479
+ Redirected to http://test.host/
480
+ Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
481
+  (0.1ms) rollback transaction
482
+  (0.1ms) begin transaction
483
+ ------------------------------------------------------------------------------------
484
+ UserImpersonate::ImpersonateControllerTest: test_index_should_require_authentication
485
+ ------------------------------------------------------------------------------------
486
+ Processing by UserImpersonate::ImpersonateController#index as HTML
487
+ Completed 401 Unauthorized in 0ms
488
+  (0.1ms) rollback transaction
489
+  (0.1ms) begin transaction
490
+ -------------------------------
491
+ UserImpersonateTest: test_truth
492
+ -------------------------------
493
+  (0.1ms) rollback transaction
494
+  (21.9ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) DEFAULT '' NOT NULL, "email" varchar(255) DEFAULT '' NOT NULL, "encrypted_password" varchar(255) DEFAULT '' NOT NULL, "reset_password_token" varchar(255), "reset_password_sent_at" datetime, "remember_created_at" datetime, "sign_in_count" integer DEFAULT 0, "current_sign_in_at" datetime, "last_sign_in_at" datetime, "current_sign_in_ip" varchar(255), "last_sign_in_ip" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL, "staff" boolean DEFAULT 'f') 
495
+  (15.7ms) CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
496
+  (19.6ms) CREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")
497
+  (22.6ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
498
+  (37.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
499
+  (0.1ms) SELECT version FROM "schema_migrations"
500
+  (33.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120914184123')
501
+  (33.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120914174453')
502
+  (0.4ms) begin transaction
503
+  (0.1ms) commit transaction
504
+  (0.0ms) begin transaction
505
+  (0.1ms) SAVEPOINT active_record_1
506
+ Fixture Delete (0.1ms) DELETE FROM "users"
507
+ Fixture Insert (0.2ms) INSERT INTO "users" ("id", "name", "email", "staff", "encrypted_password", "created_at", "updated_at") VALUES (1, 'Dr Nic Williams', 'drnicwilliams@gmail.com', 't', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2014-03-19 01:34:34', '2014-03-19 01:34:34')
508
+ Fixture Insert (0.1ms) INSERT INTO "users" ("id", "name", "email", "encrypted_password", "created_at", "updated_at") VALUES (2, 'Normal User', 'normaluser@gmail.com', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2014-03-19 01:34:34', '2014-03-19 01:34:34')
509
+  (0.0ms) RELEASE SAVEPOINT active_record_1
510
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."name" = 'Normal User' LIMIT 1
511
+ Started GET "/users/sign_in" for 127.0.0.1 at 2014-03-18 18:34:34 -0700
512
+ Processing by Devise::SessionsController#new as HTML
513
+ Rendered /home/rcook/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/devise-3.2.2/app/views/devise/shared/_links.erb (1.2ms)
514
+ Rendered /home/rcook/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/devise-3.2.2/app/views/devise/sessions/new.html.erb within layouts/application (21.1ms)
515
+ Completed 200 OK in 87ms (Views: 63.7ms | ActiveRecord: 0.0ms)
516
+ Started POST "/users/sign_in" for 127.0.0.1 at 2014-03-18 18:34:34 -0700
517
+ Processing by Devise::SessionsController#create as HTML
518
+ Parameters: {"utf8"=>"✓", "user"=>{"email"=>"normaluser@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign in"}
519
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."email" = 'normaluser@gmail.com' ORDER BY "users"."id" ASC LIMIT 1
520
+ SQL (1.1ms) UPDATE "users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 2 [["last_sign_in_at", Wed, 19 Mar 2014 01:34:34 UTC +00:00], ["current_sign_in_at", Wed, 19 Mar 2014 01:34:34 UTC +00:00], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", Wed, 19 Mar 2014 01:34:34 UTC +00:00]]
521
+ Redirected to http://www.example.com/
522
+ Completed 302 Found in 90ms (ActiveRecord: 1.3ms)
523
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:34:34 -0700
524
+ Processing by HomeController#index as HTML
525
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
526
+ Rendered home/index.html.erb within layouts/application (3.0ms)
527
+ Completed 200 OK in 6ms (Views: 5.7ms | ActiveRecord: 0.3ms)
528
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:34:34 -0700
529
+ Processing by HomeController#index as HTML
530
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
531
+ Rendered home/index.html.erb within layouts/application (1.3ms)
532
+ Completed 200 OK in 2ms (Views: 1.9ms | ActiveRecord: 0.2ms)
533
+ Started GET "/impersonate" for 127.0.0.1 at 2014-03-18 18:34:34 -0700
534
+ Processing by UserImpersonate::ImpersonateController#index as HTML
535
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
536
+ Redirected to
537
+ Redirected to http://www.example.com/
538
+ Filter chain halted as :current_user_must_be_staff! rendered or redirected
539
+ Completed 302 Found in 2ms (ActiveRecord: 0.2ms)
540
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:34:34 -0700
541
+ Processing by HomeController#index as HTML
542
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
543
+ Rendered home/index.html.erb within layouts/application (1.7ms)
544
+ Completed 200 OK in 3ms (Views: 2.8ms | ActiveRecord: 0.3ms)
545
+  (0.2ms) rollback transaction
546
+  (0.1ms) begin transaction
547
+  (0.0ms) commit transaction
548
+  (0.0ms) begin transaction
549
+  (0.0ms) SAVEPOINT active_record_1
550
+ Fixture Delete (0.1ms) DELETE FROM "users"
551
+ Fixture Insert (0.1ms) INSERT INTO "users" ("id", "name", "email", "staff", "encrypted_password", "created_at", "updated_at") VALUES (1, 'Dr Nic Williams', 'drnicwilliams@gmail.com', 't', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2014-03-19 01:34:34', '2014-03-19 01:34:34')
552
+ Fixture Insert (0.1ms) INSERT INTO "users" ("id", "name", "email", "encrypted_password", "created_at", "updated_at") VALUES (2, 'Normal User', 'normaluser@gmail.com', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2014-03-19 01:34:34', '2014-03-19 01:34:34')
553
+  (0.0ms) RELEASE SAVEPOINT active_record_1
554
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."name" = 'Dr Nic Williams' LIMIT 1
555
+ Started GET "/users/sign_in" for 127.0.0.1 at 2014-03-18 18:34:34 -0700
556
+ Processing by Devise::SessionsController#new as HTML
557
+ Rendered /home/rcook/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/devise-3.2.2/app/views/devise/shared/_links.erb (0.5ms)
558
+ Rendered /home/rcook/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/devise-3.2.2/app/views/devise/sessions/new.html.erb within layouts/application (4.1ms)
559
+ Completed 200 OK in 7ms (Views: 5.3ms | ActiveRecord: 0.0ms)
560
+ Started POST "/users/sign_in" for 127.0.0.1 at 2014-03-18 18:34:34 -0700
561
+ Processing by Devise::SessionsController#create as HTML
562
+ Parameters: {"utf8"=>"✓", "user"=>{"email"=>"drnicwilliams@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign in"}
563
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."email" = 'drnicwilliams@gmail.com' ORDER BY "users"."id" ASC LIMIT 1
564
+ SQL (0.5ms) UPDATE "users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 1 [["last_sign_in_at", Wed, 19 Mar 2014 01:34:34 UTC +00:00], ["current_sign_in_at", Wed, 19 Mar 2014 01:34:34 UTC +00:00], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", Wed, 19 Mar 2014 01:34:34 UTC +00:00]]
565
+ Redirected to http://www.example.com/
566
+ Completed 302 Found in 85ms (ActiveRecord: 0.7ms)
567
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:34:34 -0700
568
+ Processing by HomeController#index as HTML
569
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
570
+ Rendered home/index.html.erb within layouts/application (1.5ms)
571
+ Completed 200 OK in 2ms (Views: 2.1ms | ActiveRecord: 0.1ms)
572
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:34:34 -0700
573
+ Processing by HomeController#index as HTML
574
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
575
+ Rendered home/index.html.erb within layouts/application (1.5ms)
576
+ Completed 200 OK in 2ms (Views: 1.9ms | ActiveRecord: 0.1ms)
577
+ Started GET "/impersonate" for 127.0.0.1 at 2014-03-18 18:34:34 -0700
578
+ Processing by UserImpersonate::ImpersonateController#index as HTML
579
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
580
+  (0.2ms) SELECT COUNT(*) FROM "users" WHERE ("users"."id" NOT IN (1))
581
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE ("users"."id" NOT IN (1)) ORDER BY updated_at DESC
582
+ Rendered /home/rcook/src/user_impersonate2/app/views/user_impersonate/impersonate/index.html.erb within layouts/user_impersonate/application (5.8ms)
583
+ Completed 200 OK in 14ms (Views: 11.9ms | ActiveRecord: 0.4ms)
584
+ Started GET "/impersonate/?utf8=%E2%9C%93&search=Normal+User" for 127.0.0.1 at 2014-03-18 18:34:34 -0700
585
+ Processing by UserImpersonate::ImpersonateController#index as HTML
586
+ Parameters: {"utf8"=>"✓", "search"=>"Normal User"}
587
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
588
+  (0.1ms) SELECT COUNT(*) FROM "users" WHERE ("users"."id" NOT IN (1)) AND (name like '%Normal User%')
589
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE ("users"."id" NOT IN (1)) AND (name like '%Normal User%') ORDER BY updated_at DESC
590
+ Rendered /home/rcook/src/user_impersonate2/app/views/user_impersonate/impersonate/index.html.erb within layouts/user_impersonate/application (1.4ms)
591
+ Completed 200 OK in 4ms (Views: 1.9ms | ActiveRecord: 0.4ms)
592
+ Started GET "/impersonate/user/2" for 127.0.0.1 at 2014-03-18 18:34:34 -0700
593
+ Processing by UserImpersonate::ImpersonateController#create as HTML
594
+ Parameters: {"user_id"=>"2"}
595
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
596
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "2"]]
597
+ SQL (0.3ms) UPDATE "users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 2 [["last_sign_in_at", Wed, 19 Mar 2014 01:34:34 UTC +00:00], ["current_sign_in_at", Wed, 19 Mar 2014 01:34:34 UTC +00:00], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", Wed, 19 Mar 2014 01:34:34 UTC +00:00]]
598
+ Redirected to http://www.example.com/
599
+ Completed 302 Found in 5ms (ActiveRecord: 0.8ms)
600
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:34:34 -0700
601
+ Processing by HomeController#index as HTML
602
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
603
+ Rendered home/index.html.erb within layouts/application (1.0ms)
604
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
605
+ Rendered user_impersonate/_header.html.erb (1.6ms)
606
+ Completed 200 OK in 4ms (Views: 4.0ms | ActiveRecord: 0.2ms)
607
+ Started DELETE "/impersonate/revert" for 127.0.0.1 at 2014-03-18 18:34:34 -0700
608
+ Processing by UserImpersonate::ImpersonateController#destroy as HTML
609
+ Parameters: {"utf8"=>"✓"}
610
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
611
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
612
+ SQL (0.2ms) UPDATE "users" SET "current_sign_in_at" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 1 [["current_sign_in_at", Wed, 19 Mar 2014 01:34:34 UTC +00:00], ["sign_in_count", 2], ["updated_at", Wed, 19 Mar 2014 01:34:34 UTC +00:00]]
613
+ Redirected to http://www.example.com/
614
+ Completed 302 Found in 4ms (ActiveRecord: 0.4ms)
615
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:34:34 -0700
616
+ Processing by HomeController#index as HTML
617
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
618
+ Rendered home/index.html.erb within layouts/application (1.2ms)
619
+ Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.1ms)
620
+  (0.2ms) rollback transaction
621
+  (0.4ms) begin transaction
622
+ -------------------------------------------------------------------------------------
623
+ UserImpersonate::ImpersonateControllerTest: test_create_should_require_authentication
624
+ -------------------------------------------------------------------------------------
625
+ Processing by UserImpersonate::ImpersonateController#create as HTML
626
+ Completed 401 Unauthorized in 8ms
627
+ Rendered text template (0.0ms)
628
+  (0.1ms) rollback transaction
629
+  (0.1ms) begin transaction
630
+ ------------------------------------------------------------------------------------------
631
+ UserImpersonate::ImpersonateControllerTest: test_destroy_should_not_require_authentication
632
+ ------------------------------------------------------------------------------------------
633
+ Processing by UserImpersonate::ImpersonateController#destroy as HTML
634
+ Redirected to http://test.host/
635
+ Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
636
+  (0.1ms) rollback transaction
637
+  (0.0ms) begin transaction
638
+ ------------------------------------------------------------------------------------
639
+ UserImpersonate::ImpersonateControllerTest: test_index_should_require_authentication
640
+ ------------------------------------------------------------------------------------
641
+ Processing by UserImpersonate::ImpersonateController#index as HTML
642
+ Completed 401 Unauthorized in 0ms
643
+  (0.1ms) rollback transaction
644
+  (0.1ms) begin transaction
645
+ -------------------------------
646
+ UserImpersonateTest: test_truth
647
+ -------------------------------
648
+  (0.1ms) rollback transaction
649
+  (26.7ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) DEFAULT '' NOT NULL, "email" varchar(255) DEFAULT '' NOT NULL, "encrypted_password" varchar(255) DEFAULT '' NOT NULL, "reset_password_token" varchar(255), "reset_password_sent_at" datetime, "remember_created_at" datetime, "sign_in_count" integer DEFAULT 0, "current_sign_in_at" datetime, "last_sign_in_at" datetime, "current_sign_in_ip" varchar(255), "last_sign_in_ip" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL, "staff" boolean DEFAULT 'f') 
650
+  (29.1ms) CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
651
+  (24.3ms) CREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")
652
+  (29.7ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
653
+  (35.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
654
+  (0.1ms) SELECT version FROM "schema_migrations"
655
+  (32.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120914184123')
656
+  (32.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20120914174453')
657
+  (0.3ms) begin transaction
658
+  (0.0ms) commit transaction
659
+  (0.0ms) begin transaction
660
+  (0.1ms) SAVEPOINT active_record_1
661
+ Fixture Delete (0.1ms) DELETE FROM "users"
662
+ Fixture Insert (0.2ms) INSERT INTO "users" ("id", "name", "email", "staff", "encrypted_password", "created_at", "updated_at") VALUES (1, 'Dr Nic Williams', 'drnicwilliams@gmail.com', 't', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2014-03-19 01:37:04', '2014-03-19 01:37:04')
663
+ Fixture Insert (0.1ms) INSERT INTO "users" ("id", "name", "email", "encrypted_password", "created_at", "updated_at") VALUES (2, 'Normal User', 'normaluser@gmail.com', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2014-03-19 01:37:04', '2014-03-19 01:37:04')
664
+  (0.0ms) RELEASE SAVEPOINT active_record_1
665
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."name" = 'Normal User' LIMIT 1
666
+ Started GET "/users/sign_in" for 127.0.0.1 at 2014-03-18 18:37:04 -0700
667
+ Processing by Devise::SessionsController#new as HTML
668
+ Rendered /home/rcook/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/devise-3.2.2/app/views/devise/shared/_links.erb (1.1ms)
669
+ Rendered /home/rcook/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/devise-3.2.2/app/views/devise/sessions/new.html.erb within layouts/application (15.3ms)
670
+ Completed 200 OK in 77ms (Views: 55.2ms | ActiveRecord: 0.0ms)
671
+ Started POST "/users/sign_in" for 127.0.0.1 at 2014-03-18 18:37:04 -0700
672
+ Processing by Devise::SessionsController#create as HTML
673
+ Parameters: {"utf8"=>"✓", "user"=>{"email"=>"normaluser@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign in"}
674
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."email" = 'normaluser@gmail.com' ORDER BY "users"."id" ASC LIMIT 1
675
+ SQL (0.9ms) UPDATE "users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 2 [["last_sign_in_at", Wed, 19 Mar 2014 01:37:04 UTC +00:00], ["current_sign_in_at", Wed, 19 Mar 2014 01:37:04 UTC +00:00], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", Wed, 19 Mar 2014 01:37:04 UTC +00:00]]
676
+ Redirected to http://www.example.com/
677
+ Completed 302 Found in 82ms (ActiveRecord: 1.1ms)
678
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:37:04 -0700
679
+ Processing by HomeController#index as HTML
680
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
681
+ Rendered home/index.html.erb within layouts/application (1.7ms)
682
+ Completed 200 OK in 4ms (Views: 3.1ms | ActiveRecord: 0.2ms)
683
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:37:04 -0700
684
+ Processing by HomeController#index as HTML
685
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
686
+ Rendered home/index.html.erb within layouts/application (0.9ms)
687
+ Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.1ms)
688
+ Started GET "/impersonate" for 127.0.0.1 at 2014-03-18 18:37:04 -0700
689
+ Processing by UserImpersonate::ImpersonateController#index as HTML
690
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
691
+ Redirected to
692
+ Redirected to http://www.example.com/
693
+ Filter chain halted as :current_user_must_be_staff! rendered or redirected
694
+ Completed 302 Found in 2ms (ActiveRecord: 0.1ms)
695
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:37:04 -0700
696
+ Processing by HomeController#index as HTML
697
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
698
+ Rendered home/index.html.erb within layouts/application (0.9ms)
699
+ Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.1ms)
700
+  (0.2ms) rollback transaction
701
+  (0.1ms) begin transaction
702
+  (0.0ms) commit transaction
703
+  (0.0ms) begin transaction
704
+  (0.0ms) SAVEPOINT active_record_1
705
+ Fixture Delete (0.1ms) DELETE FROM "users"
706
+ Fixture Insert (0.1ms) INSERT INTO "users" ("id", "name", "email", "staff", "encrypted_password", "created_at", "updated_at") VALUES (1, 'Dr Nic Williams', 'drnicwilliams@gmail.com', 't', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2014-03-19 01:37:04', '2014-03-19 01:37:04')
707
+ Fixture Insert (0.1ms) INSERT INTO "users" ("id", "name", "email", "encrypted_password", "created_at", "updated_at") VALUES (2, 'Normal User', 'normaluser@gmail.com', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2014-03-19 01:37:04', '2014-03-19 01:37:04')
708
+  (0.0ms) RELEASE SAVEPOINT active_record_1
709
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."name" = 'Dr Nic Williams' LIMIT 1
710
+ Started GET "/users/sign_in" for 127.0.0.1 at 2014-03-18 18:37:04 -0700
711
+ Processing by Devise::SessionsController#new as HTML
712
+ Rendered /home/rcook/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/devise-3.2.2/app/views/devise/shared/_links.erb (0.3ms)
713
+ Rendered /home/rcook/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/devise-3.2.2/app/views/devise/sessions/new.html.erb within layouts/application (2.3ms)
714
+ Completed 200 OK in 4ms (Views: 3.1ms | ActiveRecord: 0.0ms)
715
+ Started POST "/users/sign_in" for 127.0.0.1 at 2014-03-18 18:37:04 -0700
716
+ Processing by Devise::SessionsController#create as HTML
717
+ Parameters: {"utf8"=>"✓", "user"=>{"email"=>"drnicwilliams@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign in"}
718
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = 'drnicwilliams@gmail.com' ORDER BY "users"."id" ASC LIMIT 1
719
+ SQL (0.4ms) UPDATE "users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 1 [["last_sign_in_at", Wed, 19 Mar 2014 01:37:04 UTC +00:00], ["current_sign_in_at", Wed, 19 Mar 2014 01:37:04 UTC +00:00], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", Wed, 19 Mar 2014 01:37:04 UTC +00:00]]
720
+ Redirected to http://www.example.com/
721
+ Completed 302 Found in 78ms (ActiveRecord: 0.5ms)
722
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:37:04 -0700
723
+ Processing by HomeController#index as HTML
724
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
725
+ Rendered home/index.html.erb within layouts/application (1.3ms)
726
+ Completed 200 OK in 2ms (Views: 1.9ms | ActiveRecord: 0.1ms)
727
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:37:04 -0700
728
+ Processing by HomeController#index as HTML
729
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
730
+ Rendered home/index.html.erb within layouts/application (1.4ms)
731
+ Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.1ms)
732
+ Started GET "/impersonate" for 127.0.0.1 at 2014-03-18 18:37:04 -0700
733
+ Processing by UserImpersonate::ImpersonateController#index as HTML
734
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
735
+  (0.2ms) SELECT COUNT(*) FROM "users" WHERE ("users"."id" NOT IN (1))
736
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE ("users"."id" NOT IN (1)) ORDER BY updated_at DESC
737
+ Rendered /home/rcook/src/user_impersonate2/app/views/user_impersonate/impersonate/index.html.erb within layouts/user_impersonate/application (5.7ms)
738
+ Completed 200 OK in 13ms (Views: 11.6ms | ActiveRecord: 0.4ms)
739
+ Started GET "/impersonate/?utf8=%E2%9C%93&search=Normal+User" for 127.0.0.1 at 2014-03-18 18:37:04 -0700
740
+ Processing by UserImpersonate::ImpersonateController#index as HTML
741
+ Parameters: {"utf8"=>"✓", "search"=>"Normal User"}
742
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
743
+  (0.1ms) SELECT COUNT(*) FROM "users" WHERE ("users"."id" NOT IN (1)) AND (name like '%Normal User%')
744
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE ("users"."id" NOT IN (1)) AND (name like '%Normal User%') ORDER BY updated_at DESC
745
+ Rendered /home/rcook/src/user_impersonate2/app/views/user_impersonate/impersonate/index.html.erb within layouts/user_impersonate/application (1.4ms)
746
+ Completed 200 OK in 4ms (Views: 1.8ms | ActiveRecord: 0.4ms)
747
+ Started GET "/impersonate/user/2" for 127.0.0.1 at 2014-03-18 18:37:04 -0700
748
+ Processing by UserImpersonate::ImpersonateController#create as HTML
749
+ Parameters: {"user_id"=>"2"}
750
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
751
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "2"]]
752
+ SQL (0.2ms) UPDATE "users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 2 [["last_sign_in_at", Wed, 19 Mar 2014 01:37:04 UTC +00:00], ["current_sign_in_at", Wed, 19 Mar 2014 01:37:04 UTC +00:00], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", Wed, 19 Mar 2014 01:37:04 UTC +00:00]]
753
+ Redirected to http://www.example.com/
754
+ Completed 302 Found in 3ms (ActiveRecord: 0.5ms)
755
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:37:04 -0700
756
+ Processing by HomeController#index as HTML
757
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
758
+ Rendered home/index.html.erb within layouts/application (0.9ms)
759
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
760
+ Rendered user_impersonate/_header.html.erb (2.5ms)
761
+ Completed 200 OK in 6ms (Views: 5.2ms | ActiveRecord: 0.2ms)
762
+ Started DELETE "/impersonate/revert" for 127.0.0.1 at 2014-03-18 18:37:04 -0700
763
+ Processing by UserImpersonate::ImpersonateController#destroy as HTML
764
+ Parameters: {"utf8"=>"✓"}
765
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
766
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
767
+ SQL (0.2ms) UPDATE "users" SET "current_sign_in_at" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 1 [["current_sign_in_at", Wed, 19 Mar 2014 01:37:04 UTC +00:00], ["sign_in_count", 2], ["updated_at", Wed, 19 Mar 2014 01:37:04 UTC +00:00]]
768
+ Redirected to http://www.example.com/
769
+ Completed 302 Found in 3ms (ActiveRecord: 0.4ms)
770
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:37:04 -0700
771
+ Processing by HomeController#index as HTML
772
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
773
+ Rendered home/index.html.erb within layouts/application (1.1ms)
774
+ Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.1ms)
775
+  (0.2ms) rollback transaction
776
+  (0.4ms) begin transaction
777
+ -------------------------------------------------------------------------------------
778
+ UserImpersonate::ImpersonateControllerTest: test_create_should_require_authentication
779
+ -------------------------------------------------------------------------------------
780
+ Processing by UserImpersonate::ImpersonateController#create as HTML
781
+ Completed 401 Unauthorized in 8ms
782
+ Rendered text template (0.0ms)
783
+  (0.1ms) rollback transaction
784
+  (0.1ms) begin transaction
785
+ ------------------------------------------------------------------------------------------
786
+ UserImpersonate::ImpersonateControllerTest: test_destroy_should_not_require_authentication
787
+ ------------------------------------------------------------------------------------------
788
+ Processing by UserImpersonate::ImpersonateController#destroy as HTML
789
+ Redirected to http://test.host/
790
+ Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
791
+  (0.1ms) rollback transaction
792
+  (0.0ms) begin transaction
793
+ ------------------------------------------------------------------------------------
794
+ UserImpersonate::ImpersonateControllerTest: test_index_should_require_authentication
795
+ ------------------------------------------------------------------------------------
796
+ Processing by UserImpersonate::ImpersonateController#index as HTML
797
+ Completed 401 Unauthorized in 0ms
798
+  (0.1ms) rollback transaction
799
+  (0.1ms) begin transaction
800
+ -------------------------------
801
+ UserImpersonateTest: test_truth
802
+ -------------------------------
803
+  (0.1ms) rollback transaction
804
+  (16.6ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) DEFAULT '' NOT NULL, "email" varchar(255) DEFAULT '' NOT NULL, "encrypted_password" varchar(255) DEFAULT '' NOT NULL, "reset_password_token" varchar(255), "reset_password_sent_at" datetime, "remember_created_at" datetime, "sign_in_count" integer DEFAULT 0, "current_sign_in_at" datetime, "last_sign_in_at" datetime, "current_sign_in_ip" varchar(255), "last_sign_in_ip" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL, "staff" boolean DEFAULT 'f') 
805
+  (14.9ms) CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
806
+  (25.7ms) CREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")
807
+  (20.7ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
808
+  (15.6ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
809
+  (0.1ms) SELECT version FROM "schema_migrations"
810
+  (15.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20120914184123')
811
+  (31.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20120914174453')
812
+  (0.3ms) begin transaction
813
+  (0.0ms) commit transaction
814
+  (0.0ms) begin transaction
815
+  (0.1ms) SAVEPOINT active_record_1
816
+ Fixture Delete (0.1ms) DELETE FROM "users"
817
+ Fixture Insert (0.2ms) INSERT INTO "users" ("id", "name", "email", "staff", "encrypted_password", "created_at", "updated_at") VALUES (1, 'Dr Nic Williams', 'drnicwilliams@gmail.com', 't', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2014-03-19 01:40:50', '2014-03-19 01:40:50')
818
+ Fixture Insert (0.1ms) INSERT INTO "users" ("id", "name", "email", "encrypted_password", "created_at", "updated_at") VALUES (2, 'Normal User', 'normaluser@gmail.com', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2014-03-19 01:40:50', '2014-03-19 01:40:50')
819
+  (0.0ms) RELEASE SAVEPOINT active_record_1
820
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."name" = 'Normal User' LIMIT 1
821
+ Started GET "/users/sign_in" for 127.0.0.1 at 2014-03-18 18:40:50 -0700
822
+ Processing by Devise::SessionsController#new as HTML
823
+ Rendered /home/rcook/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/devise-3.2.2/app/views/devise/shared/_links.erb (1.1ms)
824
+ Rendered /home/rcook/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/devise-3.2.2/app/views/devise/sessions/new.html.erb within layouts/application (15.4ms)
825
+ Completed 200 OK in 77ms (Views: 54.7ms | ActiveRecord: 0.0ms)
826
+ Started POST "/users/sign_in" for 127.0.0.1 at 2014-03-18 18:40:50 -0700
827
+ Processing by Devise::SessionsController#create as HTML
828
+ Parameters: {"utf8"=>"✓", "user"=>{"email"=>"normaluser@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign in"}
829
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."email" = 'normaluser@gmail.com' ORDER BY "users"."id" ASC LIMIT 1
830
+ SQL (1.0ms) UPDATE "users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 2 [["last_sign_in_at", Wed, 19 Mar 2014 01:40:50 UTC +00:00], ["current_sign_in_at", Wed, 19 Mar 2014 01:40:50 UTC +00:00], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", Wed, 19 Mar 2014 01:40:50 UTC +00:00]]
831
+ Redirected to http://www.example.com/
832
+ Completed 302 Found in 82ms (ActiveRecord: 1.2ms)
833
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:40:50 -0700
834
+ Processing by HomeController#index as HTML
835
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
836
+ Rendered home/index.html.erb within layouts/application (1.8ms)
837
+ Completed 200 OK in 4ms (Views: 3.2ms | ActiveRecord: 0.2ms)
838
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:40:50 -0700
839
+ Processing by HomeController#index as HTML
840
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
841
+ Rendered home/index.html.erb within layouts/application (0.9ms)
842
+ Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.2ms)
843
+ Started GET "/impersonate" for 127.0.0.1 at 2014-03-18 18:40:50 -0700
844
+ Processing by UserImpersonate::ImpersonateController#index as HTML
845
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
846
+ Redirected to
847
+ Redirected to http://www.example.com/
848
+ Filter chain halted as :current_user_must_be_staff! rendered or redirected
849
+ Completed 302 Found in 2ms (ActiveRecord: 0.2ms)
850
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:40:50 -0700
851
+ Processing by HomeController#index as HTML
852
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
853
+ Rendered home/index.html.erb within layouts/application (0.8ms)
854
+ Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.1ms)
855
+  (0.2ms) rollback transaction
856
+  (0.1ms) begin transaction
857
+  (0.0ms) commit transaction
858
+  (0.0ms) begin transaction
859
+  (0.1ms) SAVEPOINT active_record_1
860
+ Fixture Delete (0.1ms) DELETE FROM "users"
861
+ Fixture Insert (0.1ms) INSERT INTO "users" ("id", "name", "email", "staff", "encrypted_password", "created_at", "updated_at") VALUES (1, 'Dr Nic Williams', 'drnicwilliams@gmail.com', 't', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2014-03-19 01:40:50', '2014-03-19 01:40:50')
862
+ Fixture Insert (0.1ms) INSERT INTO "users" ("id", "name", "email", "encrypted_password", "created_at", "updated_at") VALUES (2, 'Normal User', 'normaluser@gmail.com', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2014-03-19 01:40:50', '2014-03-19 01:40:50')
863
+  (0.0ms) RELEASE SAVEPOINT active_record_1
864
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."name" = 'Dr Nic Williams' LIMIT 1
865
+ Started GET "/users/sign_in" for 127.0.0.1 at 2014-03-18 18:40:50 -0700
866
+ Processing by Devise::SessionsController#new as HTML
867
+ Rendered /home/rcook/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/devise-3.2.2/app/views/devise/shared/_links.erb (0.3ms)
868
+ Rendered /home/rcook/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/devise-3.2.2/app/views/devise/sessions/new.html.erb within layouts/application (2.4ms)
869
+ Completed 200 OK in 4ms (Views: 3.2ms | ActiveRecord: 0.0ms)
870
+ Started POST "/users/sign_in" for 127.0.0.1 at 2014-03-18 18:40:50 -0700
871
+ Processing by Devise::SessionsController#create as HTML
872
+ Parameters: {"utf8"=>"✓", "user"=>{"email"=>"drnicwilliams@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign in"}
873
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."email" = 'drnicwilliams@gmail.com' ORDER BY "users"."id" ASC LIMIT 1
874
+ SQL (0.4ms) UPDATE "users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 1 [["last_sign_in_at", Wed, 19 Mar 2014 01:40:50 UTC +00:00], ["current_sign_in_at", Wed, 19 Mar 2014 01:40:50 UTC +00:00], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", Wed, 19 Mar 2014 01:40:50 UTC +00:00]]
875
+ Redirected to http://www.example.com/
876
+ Completed 302 Found in 79ms (ActiveRecord: 0.6ms)
877
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:40:50 -0700
878
+ Processing by HomeController#index as HTML
879
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
880
+ Rendered home/index.html.erb within layouts/application (1.4ms)
881
+ Completed 200 OK in 2ms (Views: 2.0ms | ActiveRecord: 0.1ms)
882
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:40:50 -0700
883
+ Processing by HomeController#index as HTML
884
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
885
+ Rendered home/index.html.erb within layouts/application (1.4ms)
886
+ Completed 200 OK in 2ms (Views: 1.9ms | ActiveRecord: 0.1ms)
887
+ Started GET "/impersonate" for 127.0.0.1 at 2014-03-18 18:40:50 -0700
888
+ Processing by UserImpersonate::ImpersonateController#index as HTML
889
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
890
+  (0.1ms) SELECT COUNT(*) FROM "users" WHERE ("users"."id" NOT IN (1))
891
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE ("users"."id" NOT IN (1)) ORDER BY updated_at DESC
892
+ Rendered /home/rcook/src/user_impersonate2/app/views/user_impersonate/impersonate/index.html.erb within layouts/user_impersonate/application (5.7ms)
893
+ Completed 200 OK in 13ms (Views: 11.5ms | ActiveRecord: 0.4ms)
894
+ Started GET "/impersonate/?utf8=%E2%9C%93&search=Normal+User" for 127.0.0.1 at 2014-03-18 18:40:50 -0700
895
+ Processing by UserImpersonate::ImpersonateController#index as HTML
896
+ Parameters: {"utf8"=>"✓", "search"=>"Normal User"}
897
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
898
+  (0.1ms) SELECT COUNT(*) FROM "users" WHERE ("users"."id" NOT IN (1)) AND (name like '%Normal User%')
899
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE ("users"."id" NOT IN (1)) AND (name like '%Normal User%') ORDER BY updated_at DESC
900
+ Rendered /home/rcook/src/user_impersonate2/app/views/user_impersonate/impersonate/index.html.erb within layouts/user_impersonate/application (1.5ms)
901
+ Completed 200 OK in 4ms (Views: 2.0ms | ActiveRecord: 0.5ms)
902
+ Started GET "/impersonate/user/2" for 127.0.0.1 at 2014-03-18 18:40:50 -0700
903
+ Processing by UserImpersonate::ImpersonateController#create as HTML
904
+ Parameters: {"user_id"=>"2"}
905
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
906
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "2"]]
907
+ SQL (0.2ms) UPDATE "users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 2 [["last_sign_in_at", Wed, 19 Mar 2014 01:40:50 UTC +00:00], ["current_sign_in_at", Wed, 19 Mar 2014 01:40:50 UTC +00:00], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", Wed, 19 Mar 2014 01:40:50 UTC +00:00]]
908
+ Redirected to http://www.example.com/
909
+ Completed 302 Found in 3ms (ActiveRecord: 0.5ms)
910
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:40:50 -0700
911
+ Processing by HomeController#index as HTML
912
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
913
+ Rendered home/index.html.erb within layouts/application (1.8ms)
914
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
915
+ Rendered user_impersonate/_header.html.erb (1.4ms)
916
+ Completed 200 OK in 5ms (Views: 4.7ms | ActiveRecord: 0.3ms)
917
+ Started DELETE "/impersonate/revert" for 127.0.0.1 at 2014-03-18 18:40:50 -0700
918
+ Processing by UserImpersonate::ImpersonateController#destroy as HTML
919
+ Parameters: {"utf8"=>"✓"}
920
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
921
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
922
+ SQL (0.2ms) UPDATE "users" SET "current_sign_in_at" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 1 [["current_sign_in_at", Wed, 19 Mar 2014 01:40:50 UTC +00:00], ["sign_in_count", 2], ["updated_at", Wed, 19 Mar 2014 01:40:50 UTC +00:00]]
923
+ Redirected to http://www.example.com/
924
+ Completed 302 Found in 4ms (ActiveRecord: 0.5ms)
925
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:40:50 -0700
926
+ Processing by HomeController#index as HTML
927
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
928
+ Rendered home/index.html.erb within layouts/application (1.1ms)
929
+ Completed 200 OK in 2ms (Views: 1.7ms | ActiveRecord: 0.1ms)
930
+  (0.2ms) rollback transaction
931
+  (0.4ms) begin transaction
932
+ -------------------------------------------------------------------------------------
933
+ UserImpersonate::ImpersonateControllerTest: test_create_should_require_authentication
934
+ -------------------------------------------------------------------------------------
935
+ Processing by UserImpersonate::ImpersonateController#create as HTML
936
+ Completed 401 Unauthorized in 11ms
937
+ Rendered text template (0.0ms)
938
+  (0.1ms) rollback transaction
939
+  (0.1ms) begin transaction
940
+ ------------------------------------------------------------------------------------------
941
+ UserImpersonate::ImpersonateControllerTest: test_destroy_should_not_require_authentication
942
+ ------------------------------------------------------------------------------------------
943
+ Processing by UserImpersonate::ImpersonateController#destroy as HTML
944
+ Redirected to http://test.host/
945
+ Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
946
+  (0.1ms) rollback transaction
947
+  (0.0ms) begin transaction
948
+ ------------------------------------------------------------------------------------
949
+ UserImpersonate::ImpersonateControllerTest: test_index_should_require_authentication
950
+ ------------------------------------------------------------------------------------
951
+ Processing by UserImpersonate::ImpersonateController#index as HTML
952
+ Completed 401 Unauthorized in 0ms
953
+  (0.1ms) rollback transaction
954
+  (0.1ms) begin transaction
955
+ -------------------------------
956
+ UserImpersonateTest: test_truth
957
+ -------------------------------
958
+  (0.0ms) rollback transaction
959
+  (28.1ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) DEFAULT '' NOT NULL, "email" varchar(255) DEFAULT '' NOT NULL, "encrypted_password" varchar(255) DEFAULT '' NOT NULL, "reset_password_token" varchar(255), "reset_password_sent_at" datetime, "remember_created_at" datetime, "sign_in_count" integer DEFAULT 0, "current_sign_in_at" datetime, "last_sign_in_at" datetime, "current_sign_in_ip" varchar(255), "last_sign_in_ip" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL, "staff" boolean DEFAULT 'f') 
960
+  (28.8ms) CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
961
+  (25.6ms) CREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")
962
+  (18.7ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
963
+  (29.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
964
+  (0.1ms) SELECT version FROM "schema_migrations"
965
+  (36.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20120914184123')
966
+  (44.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20120914174453')
967
+  (0.4ms) begin transaction
968
+  (0.1ms) commit transaction
969
+  (0.0ms) begin transaction
970
+  (0.1ms) SAVEPOINT active_record_1
971
+ Fixture Delete (0.1ms) DELETE FROM "users"
972
+ Fixture Insert (0.2ms) INSERT INTO "users" ("id", "name", "email", "staff", "encrypted_password", "created_at", "updated_at") VALUES (1, 'Dr Nic Williams', 'drnicwilliams@gmail.com', 't', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2014-03-19 01:40:59', '2014-03-19 01:40:59')
973
+ Fixture Insert (0.1ms) INSERT INTO "users" ("id", "name", "email", "encrypted_password", "created_at", "updated_at") VALUES (2, 'Normal User', 'normaluser@gmail.com', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2014-03-19 01:40:59', '2014-03-19 01:40:59')
974
+  (0.0ms) RELEASE SAVEPOINT active_record_1
975
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."name" = 'Normal User' LIMIT 1
976
+ Started GET "/users/sign_in" for 127.0.0.1 at 2014-03-18 18:40:59 -0700
977
+ Processing by Devise::SessionsController#new as HTML
978
+ Rendered /home/rcook/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/devise-3.2.2/app/views/devise/shared/_links.erb (1.0ms)
979
+ Rendered /home/rcook/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/devise-3.2.2/app/views/devise/sessions/new.html.erb within layouts/application (18.9ms)
980
+ Completed 200 OK in 61ms (Views: 40.5ms | ActiveRecord: 0.0ms)
981
+ Started POST "/users/sign_in" for 127.0.0.1 at 2014-03-18 18:40:59 -0700
982
+ Processing by Devise::SessionsController#create as HTML
983
+ Parameters: {"utf8"=>"✓", "user"=>{"email"=>"normaluser@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign in"}
984
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."email" = 'normaluser@gmail.com' ORDER BY "users"."id" ASC LIMIT 1
985
+ SQL (1.1ms) UPDATE "users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 2 [["last_sign_in_at", Wed, 19 Mar 2014 01:40:59 UTC +00:00], ["current_sign_in_at", Wed, 19 Mar 2014 01:40:59 UTC +00:00], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", Wed, 19 Mar 2014 01:40:59 UTC +00:00]]
986
+ Redirected to http://www.example.com/
987
+ Completed 302 Found in 77ms (ActiveRecord: 1.3ms)
988
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:40:59 -0700
989
+ Processing by HomeController#index as HTML
990
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
991
+ Rendered home/index.html.erb within layouts/application (1.5ms)
992
+ Completed 200 OK in 3ms (Views: 2.9ms | ActiveRecord: 0.1ms)
993
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:40:59 -0700
994
+ Processing by HomeController#index as HTML
995
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
996
+ Rendered home/index.html.erb within layouts/application (0.9ms)
997
+ Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.1ms)
998
+ Started GET "/impersonate" for 127.0.0.1 at 2014-03-18 18:40:59 -0700
999
+ Processing by UserImpersonate::ImpersonateController#index as HTML
1000
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
1001
+ Redirected to
1002
+ Redirected to http://www.example.com/
1003
+ Filter chain halted as :current_user_must_be_staff! rendered or redirected
1004
+ Completed 302 Found in 1ms (ActiveRecord: 0.1ms)
1005
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:40:59 -0700
1006
+ Processing by HomeController#index as HTML
1007
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
1008
+ Rendered home/index.html.erb within layouts/application (0.7ms)
1009
+ Completed 200 OK in 1ms (Views: 1.2ms | ActiveRecord: 0.1ms)
1010
+  (0.2ms) rollback transaction
1011
+  (0.0ms) begin transaction
1012
+  (0.0ms) commit transaction
1013
+  (0.0ms) begin transaction
1014
+  (0.0ms) SAVEPOINT active_record_1
1015
+ Fixture Delete (0.1ms) DELETE FROM "users"
1016
+ Fixture Insert (0.1ms) INSERT INTO "users" ("id", "name", "email", "staff", "encrypted_password", "created_at", "updated_at") VALUES (1, 'Dr Nic Williams', 'drnicwilliams@gmail.com', 't', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2014-03-19 01:41:00', '2014-03-19 01:41:00')
1017
+ Fixture Insert (0.1ms) INSERT INTO "users" ("id", "name", "email", "encrypted_password", "created_at", "updated_at") VALUES (2, 'Normal User', 'normaluser@gmail.com', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2014-03-19 01:41:00', '2014-03-19 01:41:00')
1018
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1019
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."name" = 'Dr Nic Williams' LIMIT 1
1020
+ Started GET "/users/sign_in" for 127.0.0.1 at 2014-03-18 18:41:00 -0700
1021
+ Processing by Devise::SessionsController#new as HTML
1022
+ Rendered /home/rcook/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/devise-3.2.2/app/views/devise/shared/_links.erb (0.3ms)
1023
+ Rendered /home/rcook/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/devise-3.2.2/app/views/devise/sessions/new.html.erb within layouts/application (2.1ms)
1024
+ Completed 200 OK in 4ms (Views: 2.9ms | ActiveRecord: 0.0ms)
1025
+ Started POST "/users/sign_in" for 127.0.0.1 at 2014-03-18 18:41:00 -0700
1026
+ Processing by Devise::SessionsController#create as HTML
1027
+ Parameters: {"utf8"=>"✓", "user"=>{"email"=>"drnicwilliams@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign in"}
1028
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."email" = 'drnicwilliams@gmail.com' ORDER BY "users"."id" ASC LIMIT 1
1029
+ SQL (0.4ms) UPDATE "users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 1 [["last_sign_in_at", Wed, 19 Mar 2014 01:41:00 UTC +00:00], ["current_sign_in_at", Wed, 19 Mar 2014 01:41:00 UTC +00:00], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", Wed, 19 Mar 2014 01:41:00 UTC +00:00]]
1030
+ Redirected to http://www.example.com/
1031
+ Completed 302 Found in 75ms (ActiveRecord: 0.5ms)
1032
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:41:00 -0700
1033
+ Processing by HomeController#index as HTML
1034
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
1035
+ Rendered home/index.html.erb within layouts/application (1.2ms)
1036
+ Completed 200 OK in 2ms (Views: 1.7ms | ActiveRecord: 0.1ms)
1037
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:41:00 -0700
1038
+ Processing by HomeController#index as HTML
1039
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
1040
+ Rendered home/index.html.erb within layouts/application (0.9ms)
1041
+ Completed 200 OK in 1ms (Views: 1.3ms | ActiveRecord: 0.1ms)
1042
+ Started GET "/impersonate" for 127.0.0.1 at 2014-03-18 18:41:00 -0700
1043
+ Processing by UserImpersonate::ImpersonateController#index as HTML
1044
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
1045
+  (0.1ms) SELECT COUNT(*) FROM "users" WHERE ("users"."id" NOT IN (1))
1046
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE ("users"."id" NOT IN (1)) ORDER BY updated_at DESC
1047
+ Rendered /home/rcook/src/user_impersonate2/app/views/user_impersonate/impersonate/index.html.erb within layouts/user_impersonate/application (2.7ms)
1048
+ Completed 200 OK in 10ms (Views: 8.1ms | ActiveRecord: 0.4ms)
1049
+ Started GET "/impersonate/?utf8=%E2%9C%93&search=Normal+User" for 127.0.0.1 at 2014-03-18 18:41:00 -0700
1050
+ Processing by UserImpersonate::ImpersonateController#index as HTML
1051
+ Parameters: {"utf8"=>"✓", "search"=>"Normal User"}
1052
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
1053
+  (0.1ms) SELECT COUNT(*) FROM "users" WHERE ("users"."id" NOT IN (1)) AND (name like '%Normal User%')
1054
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE ("users"."id" NOT IN (1)) AND (name like '%Normal User%') ORDER BY updated_at DESC
1055
+ Rendered /home/rcook/src/user_impersonate2/app/views/user_impersonate/impersonate/index.html.erb within layouts/user_impersonate/application (1.4ms)
1056
+ Completed 200 OK in 3ms (Views: 1.8ms | ActiveRecord: 0.4ms)
1057
+ Started GET "/impersonate/user/2" for 127.0.0.1 at 2014-03-18 18:41:00 -0700
1058
+ Processing by UserImpersonate::ImpersonateController#create as HTML
1059
+ Parameters: {"user_id"=>"2"}
1060
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
1061
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "2"]]
1062
+ SQL (0.2ms) UPDATE "users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 2 [["last_sign_in_at", Wed, 19 Mar 2014 01:41:00 UTC +00:00], ["current_sign_in_at", Wed, 19 Mar 2014 01:41:00 UTC +00:00], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", Wed, 19 Mar 2014 01:41:00 UTC +00:00]]
1063
+ Redirected to http://www.example.com/
1064
+ Completed 302 Found in 3ms (ActiveRecord: 0.5ms)
1065
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:41:00 -0700
1066
+ Processing by HomeController#index as HTML
1067
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
1068
+ Rendered home/index.html.erb within layouts/application (0.9ms)
1069
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
1070
+ Rendered user_impersonate/_header.html.erb (1.2ms)
1071
+ Completed 200 OK in 4ms (Views: 3.3ms | ActiveRecord: 0.2ms)
1072
+ Started DELETE "/impersonate/revert" for 127.0.0.1 at 2014-03-18 18:41:00 -0700
1073
+ Processing by UserImpersonate::ImpersonateController#destroy as HTML
1074
+ Parameters: {"utf8"=>"✓"}
1075
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
1076
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
1077
+ SQL (0.2ms) UPDATE "users" SET "current_sign_in_at" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 1 [["current_sign_in_at", Wed, 19 Mar 2014 01:41:00 UTC +00:00], ["sign_in_count", 2], ["updated_at", Wed, 19 Mar 2014 01:41:00 UTC +00:00]]
1078
+ Redirected to http://www.example.com/
1079
+ Completed 302 Found in 3ms (ActiveRecord: 0.4ms)
1080
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:41:00 -0700
1081
+ Processing by HomeController#index as HTML
1082
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
1083
+ Rendered home/index.html.erb within layouts/application (1.0ms)
1084
+ Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.1ms)
1085
+  (0.2ms) rollback transaction
1086
+  (0.7ms) begin transaction
1087
+ -------------------------------------------------------------------------------------
1088
+ UserImpersonate::ImpersonateControllerTest: test_create_should_require_authentication
1089
+ -------------------------------------------------------------------------------------
1090
+ Processing by UserImpersonate::ImpersonateController#create as HTML
1091
+ Completed 401 Unauthorized in 10ms
1092
+ Rendered text template (0.0ms)
1093
+  (0.1ms) rollback transaction
1094
+  (0.1ms) begin transaction
1095
+ ------------------------------------------------------------------------------------------
1096
+ UserImpersonate::ImpersonateControllerTest: test_destroy_should_not_require_authentication
1097
+ ------------------------------------------------------------------------------------------
1098
+ Processing by UserImpersonate::ImpersonateController#destroy as HTML
1099
+ Redirected to http://test.host/
1100
+ Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
1101
+  (0.1ms) rollback transaction
1102
+  (0.1ms) begin transaction
1103
+ ------------------------------------------------------------------------------------
1104
+ UserImpersonate::ImpersonateControllerTest: test_index_should_require_authentication
1105
+ ------------------------------------------------------------------------------------
1106
+ Processing by UserImpersonate::ImpersonateController#index as HTML
1107
+ Completed 401 Unauthorized in 0ms
1108
+  (0.1ms) rollback transaction
1109
+  (0.1ms) begin transaction
1110
+ -------------------------------
1111
+ UserImpersonateTest: test_truth
1112
+ -------------------------------
1113
+  (0.1ms) rollback transaction
1114
+  (16.6ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) DEFAULT '' NOT NULL, "email" varchar(255) DEFAULT '' NOT NULL, "encrypted_password" varchar(255) DEFAULT '' NOT NULL, "reset_password_token" varchar(255), "reset_password_sent_at" datetime, "remember_created_at" datetime, "sign_in_count" integer DEFAULT 0, "current_sign_in_at" datetime, "last_sign_in_at" datetime, "current_sign_in_ip" varchar(255), "last_sign_in_ip" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL, "staff" boolean DEFAULT 'f') 
1115
+  (20.6ms) CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
1116
+  (21.7ms) CREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")
1117
+  (41.4ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
1118
+  (33.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
1119
+  (0.1ms) SELECT version FROM "schema_migrations"
1120
+  (27.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120914184123')
1121
+  (25.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20120914174453')
1122
+  (0.3ms) begin transaction
1123
+  (0.0ms) commit transaction
1124
+  (0.0ms) begin transaction
1125
+  (0.1ms) SAVEPOINT active_record_1
1126
+ Fixture Delete (0.1ms) DELETE FROM "users"
1127
+ Fixture Insert (0.2ms) INSERT INTO "users" ("id", "name", "email", "staff", "encrypted_password", "created_at", "updated_at") VALUES (1, 'Dr Nic Williams', 'drnicwilliams@gmail.com', 't', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2014-03-19 01:55:34', '2014-03-19 01:55:34')
1128
+ Fixture Insert (0.1ms) INSERT INTO "users" ("id", "name", "email", "encrypted_password", "created_at", "updated_at") VALUES (2, 'Normal User', 'normaluser@gmail.com', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2014-03-19 01:55:34', '2014-03-19 01:55:34')
1129
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1130
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."name" = 'Normal User' LIMIT 1
1131
+ Started GET "/users/sign_in" for 127.0.0.1 at 2014-03-18 18:55:34 -0700
1132
+ Processing by Devise::SessionsController#new as HTML
1133
+ Rendered /home/rcook/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/devise-3.2.2/app/views/devise/shared/_links.erb (1.1ms)
1134
+ Rendered /home/rcook/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/devise-3.2.2/app/views/devise/sessions/new.html.erb within layouts/application (15.5ms)
1135
+ Completed 200 OK in 79ms (Views: 57.6ms | ActiveRecord: 0.0ms)
1136
+ Started POST "/users/sign_in" for 127.0.0.1 at 2014-03-18 18:55:34 -0700
1137
+ Processing by Devise::SessionsController#create as HTML
1138
+ Parameters: {"utf8"=>"✓", "user"=>{"email"=>"normaluser@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign in"}
1139
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."email" = 'normaluser@gmail.com' ORDER BY "users"."id" ASC LIMIT 1
1140
+ SQL (0.9ms) UPDATE "users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 2 [["last_sign_in_at", Wed, 19 Mar 2014 01:55:34 UTC +00:00], ["current_sign_in_at", Wed, 19 Mar 2014 01:55:34 UTC +00:00], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", Wed, 19 Mar 2014 01:55:34 UTC +00:00]]
1141
+ Redirected to http://www.example.com/
1142
+ Completed 302 Found in 81ms (ActiveRecord: 1.1ms)
1143
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:55:34 -0700
1144
+ Processing by HomeController#index as HTML
1145
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
1146
+ Rendered home/index.html.erb within layouts/application (1.8ms)
1147
+ Completed 200 OK in 4ms (Views: 3.3ms | ActiveRecord: 0.2ms)
1148
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:55:34 -0700
1149
+ Processing by HomeController#index as HTML
1150
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
1151
+ Rendered home/index.html.erb within layouts/application (0.9ms)
1152
+ Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.1ms)
1153
+ Started GET "/impersonate" for 127.0.0.1 at 2014-03-18 18:55:34 -0700
1154
+ Processing by UserImpersonate::ImpersonateController#index as HTML
1155
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
1156
+ Redirected to
1157
+ Redirected to http://www.example.com/
1158
+ Filter chain halted as :current_user_must_be_staff! rendered or redirected
1159
+ Completed 302 Found in 2ms (ActiveRecord: 0.1ms)
1160
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:55:34 -0700
1161
+ Processing by HomeController#index as HTML
1162
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
1163
+ Rendered home/index.html.erb within layouts/application (0.9ms)
1164
+ Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.1ms)
1165
+  (0.2ms) rollback transaction
1166
+  (0.1ms) begin transaction
1167
+  (0.0ms) commit transaction
1168
+  (0.0ms) begin transaction
1169
+  (0.0ms) SAVEPOINT active_record_1
1170
+ Fixture Delete (0.1ms) DELETE FROM "users"
1171
+ Fixture Insert (0.1ms) INSERT INTO "users" ("id", "name", "email", "staff", "encrypted_password", "created_at", "updated_at") VALUES (1, 'Dr Nic Williams', 'drnicwilliams@gmail.com', 't', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2014-03-19 01:55:34', '2014-03-19 01:55:34')
1172
+ Fixture Insert (0.1ms) INSERT INTO "users" ("id", "name", "email", "encrypted_password", "created_at", "updated_at") VALUES (2, 'Normal User', 'normaluser@gmail.com', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2014-03-19 01:55:34', '2014-03-19 01:55:34')
1173
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1174
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."name" = 'Dr Nic Williams' LIMIT 1
1175
+ Started GET "/users/sign_in" for 127.0.0.1 at 2014-03-18 18:55:34 -0700
1176
+ Processing by Devise::SessionsController#new as HTML
1177
+ Rendered /home/rcook/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/devise-3.2.2/app/views/devise/shared/_links.erb (0.3ms)
1178
+ Rendered /home/rcook/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/devise-3.2.2/app/views/devise/sessions/new.html.erb within layouts/application (2.1ms)
1179
+ Completed 200 OK in 4ms (Views: 2.9ms | ActiveRecord: 0.0ms)
1180
+ Started POST "/users/sign_in" for 127.0.0.1 at 2014-03-18 18:55:34 -0700
1181
+ Processing by Devise::SessionsController#create as HTML
1182
+ Parameters: {"utf8"=>"✓", "user"=>{"email"=>"drnicwilliams@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign in"}
1183
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = 'drnicwilliams@gmail.com' ORDER BY "users"."id" ASC LIMIT 1
1184
+ SQL (0.4ms) UPDATE "users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 1 [["last_sign_in_at", Wed, 19 Mar 2014 01:55:34 UTC +00:00], ["current_sign_in_at", Wed, 19 Mar 2014 01:55:34 UTC +00:00], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", Wed, 19 Mar 2014 01:55:34 UTC +00:00]]
1185
+ Redirected to http://www.example.com/
1186
+ Completed 302 Found in 80ms (ActiveRecord: 0.5ms)
1187
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:55:34 -0700
1188
+ Processing by HomeController#index as HTML
1189
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
1190
+ Rendered home/index.html.erb within layouts/application (1.4ms)
1191
+ Completed 200 OK in 2ms (Views: 2.0ms | ActiveRecord: 0.1ms)
1192
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:55:34 -0700
1193
+ Processing by HomeController#index as HTML
1194
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
1195
+ Rendered home/index.html.erb within layouts/application (1.4ms)
1196
+ Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.1ms)
1197
+ Started GET "/impersonate" for 127.0.0.1 at 2014-03-18 18:55:34 -0700
1198
+ Processing by UserImpersonate::ImpersonateController#index as HTML
1199
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
1200
+  (0.1ms) SELECT COUNT(*) FROM "users" WHERE ("users"."id" NOT IN (1))
1201
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE ("users"."id" NOT IN (1)) ORDER BY updated_at DESC
1202
+ Rendered /home/rcook/src/user_impersonate2/app/views/user_impersonate/impersonate/index.html.erb within layouts/user_impersonate/application (5.8ms)
1203
+ Completed 200 OK in 13ms (Views: 11.5ms | ActiveRecord: 0.4ms)
1204
+ Started GET "/impersonate/?utf8=%E2%9C%93&search=Normal+User" for 127.0.0.1 at 2014-03-18 18:55:34 -0700
1205
+ Processing by UserImpersonate::ImpersonateController#index as HTML
1206
+ Parameters: {"utf8"=>"✓", "search"=>"Normal User"}
1207
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
1208
+  (0.1ms) SELECT COUNT(*) FROM "users" WHERE ("users"."id" NOT IN (1)) AND (name like '%Normal User%')
1209
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE ("users"."id" NOT IN (1)) AND (name like '%Normal User%') ORDER BY updated_at DESC
1210
+ Rendered /home/rcook/src/user_impersonate2/app/views/user_impersonate/impersonate/index.html.erb within layouts/user_impersonate/application (1.4ms)
1211
+ Completed 200 OK in 4ms (Views: 1.8ms | ActiveRecord: 0.4ms)
1212
+ Started GET "/impersonate/user/2" for 127.0.0.1 at 2014-03-18 18:55:34 -0700
1213
+ Processing by UserImpersonate::ImpersonateController#create as HTML
1214
+ Parameters: {"user_id"=>"2"}
1215
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
1216
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "2"]]
1217
+ SQL (0.2ms) UPDATE "users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 2 [["last_sign_in_at", Wed, 19 Mar 2014 01:55:34 UTC +00:00], ["current_sign_in_at", Wed, 19 Mar 2014 01:55:34 UTC +00:00], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", Wed, 19 Mar 2014 01:55:34 UTC +00:00]]
1218
+ Redirected to http://www.example.com/
1219
+ Completed 302 Found in 3ms (ActiveRecord: 0.5ms)
1220
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:55:34 -0700
1221
+ Processing by HomeController#index as HTML
1222
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
1223
+ Rendered home/index.html.erb within layouts/application (0.9ms)
1224
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
1225
+ Rendered user_impersonate/_header.html.erb (1.3ms)
1226
+ Completed 200 OK in 4ms (Views: 3.5ms | ActiveRecord: 0.2ms)
1227
+ Started DELETE "/impersonate/revert" for 127.0.0.1 at 2014-03-18 18:55:34 -0700
1228
+ Processing by UserImpersonate::ImpersonateController#destroy as HTML
1229
+ Parameters: {"utf8"=>"✓"}
1230
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
1231
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
1232
+ SQL (0.2ms) UPDATE "users" SET "current_sign_in_at" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 1 [["current_sign_in_at", Wed, 19 Mar 2014 01:55:34 UTC +00:00], ["sign_in_count", 2], ["updated_at", Wed, 19 Mar 2014 01:55:34 UTC +00:00]]
1233
+ Redirected to http://www.example.com/
1234
+ Completed 302 Found in 4ms (ActiveRecord: 0.5ms)
1235
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:55:34 -0700
1236
+ Processing by HomeController#index as HTML
1237
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
1238
+ Rendered home/index.html.erb within layouts/application (1.2ms)
1239
+ Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.1ms)
1240
+  (0.2ms) rollback transaction
1241
+  (0.4ms) begin transaction
1242
+ -------------------------------------------------------------------------------------
1243
+ UserImpersonate::ImpersonateControllerTest: test_create_should_require_authentication
1244
+ -------------------------------------------------------------------------------------
1245
+ Processing by UserImpersonate::ImpersonateController#create as HTML
1246
+ Completed 401 Unauthorized in 9ms
1247
+ Rendered text template (0.0ms)
1248
+  (0.1ms) rollback transaction
1249
+  (0.2ms) begin transaction
1250
+ ------------------------------------------------------------------------------------------
1251
+ UserImpersonate::ImpersonateControllerTest: test_destroy_should_not_require_authentication
1252
+ ------------------------------------------------------------------------------------------
1253
+ Processing by UserImpersonate::ImpersonateController#destroy as HTML
1254
+ Redirected to http://test.host/
1255
+ Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
1256
+  (0.1ms) rollback transaction
1257
+  (0.0ms) begin transaction
1258
+ ------------------------------------------------------------------------------------
1259
+ UserImpersonate::ImpersonateControllerTest: test_index_should_require_authentication
1260
+ ------------------------------------------------------------------------------------
1261
+ Processing by UserImpersonate::ImpersonateController#index as HTML
1262
+ Completed 401 Unauthorized in 0ms
1263
+  (0.0ms) rollback transaction
1264
+  (0.1ms) begin transaction
1265
+ -------------------------------
1266
+ UserImpersonateTest: test_truth
1267
+ -------------------------------
1268
+  (0.0ms) rollback transaction
1269
+  (34.8ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) DEFAULT '' NOT NULL, "email" varchar(255) DEFAULT '' NOT NULL, "encrypted_password" varchar(255) DEFAULT '' NOT NULL, "reset_password_token" varchar(255), "reset_password_sent_at" datetime, "remember_created_at" datetime, "sign_in_count" integer DEFAULT 0, "current_sign_in_at" datetime, "last_sign_in_at" datetime, "current_sign_in_ip" varchar(255), "last_sign_in_ip" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL, "staff" boolean DEFAULT 'f') 
1270
+  (22.4ms) CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
1271
+  (27.1ms) CREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")
1272
+  (25.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
1273
+  (22.6ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
1274
+  (0.1ms) SELECT version FROM "schema_migrations"
1275
+  (15.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20120914184123')
1276
+  (22.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120914174453')
1277
+  (0.3ms) begin transaction
1278
+  (0.0ms) commit transaction
1279
+  (0.0ms) begin transaction
1280
+  (0.1ms) SAVEPOINT active_record_1
1281
+ Fixture Delete (0.2ms) DELETE FROM "users"
1282
+ Fixture Insert (0.1ms) INSERT INTO "users" ("id", "name", "email", "staff", "encrypted_password", "created_at", "updated_at") VALUES (1, 'Dr Nic Williams', 'drnicwilliams@gmail.com', 't', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2014-03-19 01:55:43', '2014-03-19 01:55:43')
1283
+ Fixture Insert (0.1ms) INSERT INTO "users" ("id", "name", "email", "encrypted_password", "created_at", "updated_at") VALUES (2, 'Normal User', 'normaluser@gmail.com', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2014-03-19 01:55:43', '2014-03-19 01:55:43')
1284
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1285
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."name" = 'Normal User' LIMIT 1
1286
+ Started GET "/users/sign_in" for 127.0.0.1 at 2014-03-18 18:55:43 -0700
1287
+ Processing by Devise::SessionsController#new as HTML
1288
+ Rendered /home/rcook/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/devise-3.2.2/app/views/devise/shared/_links.erb (1.0ms)
1289
+ Rendered /home/rcook/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/devise-3.2.2/app/views/devise/sessions/new.html.erb within layouts/application (15.9ms)
1290
+ Completed 200 OK in 52ms (Views: 30.6ms | ActiveRecord: 0.0ms)
1291
+ Started POST "/users/sign_in" for 127.0.0.1 at 2014-03-18 18:55:43 -0700
1292
+ Processing by Devise::SessionsController#create as HTML
1293
+ Parameters: {"utf8"=>"✓", "user"=>{"email"=>"normaluser@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign in"}
1294
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."email" = 'normaluser@gmail.com' ORDER BY "users"."id" ASC LIMIT 1
1295
+ SQL (1.0ms) UPDATE "users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 2 [["last_sign_in_at", Wed, 19 Mar 2014 01:55:43 UTC +00:00], ["current_sign_in_at", Wed, 19 Mar 2014 01:55:43 UTC +00:00], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", Wed, 19 Mar 2014 01:55:43 UTC +00:00]]
1296
+ Redirected to http://www.example.com/
1297
+ Completed 302 Found in 81ms (ActiveRecord: 1.2ms)
1298
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:55:43 -0700
1299
+ Processing by HomeController#index as HTML
1300
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
1301
+ Rendered home/index.html.erb within layouts/application (1.5ms)
1302
+ Completed 200 OK in 3ms (Views: 2.8ms | ActiveRecord: 0.1ms)
1303
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:55:43 -0700
1304
+ Processing by HomeController#index as HTML
1305
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
1306
+ Rendered home/index.html.erb within layouts/application (0.8ms)
1307
+ Completed 200 OK in 1ms (Views: 1.2ms | ActiveRecord: 0.1ms)
1308
+ Started GET "/impersonate" for 127.0.0.1 at 2014-03-18 18:55:43 -0700
1309
+ Processing by UserImpersonate::ImpersonateController#index as HTML
1310
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
1311
+ Redirected to
1312
+ Redirected to http://www.example.com/
1313
+ Filter chain halted as :current_user_must_be_staff! rendered or redirected
1314
+ Completed 302 Found in 2ms (ActiveRecord: 0.1ms)
1315
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:55:43 -0700
1316
+ Processing by HomeController#index as HTML
1317
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
1318
+ Rendered home/index.html.erb within layouts/application (0.8ms)
1319
+ Completed 200 OK in 1ms (Views: 1.2ms | ActiveRecord: 0.1ms)
1320
+  (0.1ms) rollback transaction
1321
+  (0.0ms) begin transaction
1322
+  (0.0ms) commit transaction
1323
+  (0.0ms) begin transaction
1324
+  (0.0ms) SAVEPOINT active_record_1
1325
+ Fixture Delete (0.1ms) DELETE FROM "users"
1326
+ Fixture Insert (0.1ms) INSERT INTO "users" ("id", "name", "email", "staff", "encrypted_password", "created_at", "updated_at") VALUES (1, 'Dr Nic Williams', 'drnicwilliams@gmail.com', 't', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2014-03-19 01:55:43', '2014-03-19 01:55:43')
1327
+ Fixture Insert (0.1ms) INSERT INTO "users" ("id", "name", "email", "encrypted_password", "created_at", "updated_at") VALUES (2, 'Normal User', 'normaluser@gmail.com', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2014-03-19 01:55:43', '2014-03-19 01:55:43')
1328
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1329
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."name" = 'Dr Nic Williams' LIMIT 1
1330
+ Started GET "/users/sign_in" for 127.0.0.1 at 2014-03-18 18:55:43 -0700
1331
+ Processing by Devise::SessionsController#new as HTML
1332
+ Rendered /home/rcook/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/devise-3.2.2/app/views/devise/shared/_links.erb (0.3ms)
1333
+ Rendered /home/rcook/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/devise-3.2.2/app/views/devise/sessions/new.html.erb within layouts/application (2.1ms)
1334
+ Completed 200 OK in 3ms (Views: 2.8ms | ActiveRecord: 0.0ms)
1335
+ Started POST "/users/sign_in" for 127.0.0.1 at 2014-03-18 18:55:43 -0700
1336
+ Processing by Devise::SessionsController#create as HTML
1337
+ Parameters: {"utf8"=>"✓", "user"=>{"email"=>"drnicwilliams@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign in"}
1338
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."email" = 'drnicwilliams@gmail.com' ORDER BY "users"."id" ASC LIMIT 1
1339
+ SQL (0.4ms) UPDATE "users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 1 [["last_sign_in_at", Wed, 19 Mar 2014 01:55:43 UTC +00:00], ["current_sign_in_at", Wed, 19 Mar 2014 01:55:43 UTC +00:00], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", Wed, 19 Mar 2014 01:55:43 UTC +00:00]]
1340
+ Redirected to http://www.example.com/
1341
+ Completed 302 Found in 78ms (ActiveRecord: 0.6ms)
1342
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:55:43 -0700
1343
+ Processing by HomeController#index as HTML
1344
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
1345
+ Rendered home/index.html.erb within layouts/application (1.3ms)
1346
+ Completed 200 OK in 2ms (Views: 1.9ms | ActiveRecord: 0.1ms)
1347
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:55:43 -0700
1348
+ Processing by HomeController#index as HTML
1349
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
1350
+ Rendered home/index.html.erb within layouts/application (1.1ms)
1351
+ Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.1ms)
1352
+ Started GET "/impersonate" for 127.0.0.1 at 2014-03-18 18:55:43 -0700
1353
+ Processing by UserImpersonate::ImpersonateController#index as HTML
1354
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
1355
+  (0.1ms) SELECT COUNT(*) FROM "users" WHERE ("users"."id" NOT IN (1))
1356
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE ("users"."id" NOT IN (1)) ORDER BY updated_at DESC
1357
+ Rendered /home/rcook/src/user_impersonate2/app/views/user_impersonate/impersonate/index.html.erb within layouts/user_impersonate/application (2.6ms)
1358
+ Completed 200 OK in 10ms (Views: 8.6ms | ActiveRecord: 0.4ms)
1359
+ Started GET "/impersonate/?utf8=%E2%9C%93&search=Normal+User" for 127.0.0.1 at 2014-03-18 18:55:43 -0700
1360
+ Processing by UserImpersonate::ImpersonateController#index as HTML
1361
+ Parameters: {"utf8"=>"✓", "search"=>"Normal User"}
1362
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
1363
+  (0.2ms) SELECT COUNT(*) FROM "users" WHERE ("users"."id" NOT IN (1)) AND (name like '%Normal User%')
1364
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE ("users"."id" NOT IN (1)) AND (name like '%Normal User%') ORDER BY updated_at DESC
1365
+ Rendered /home/rcook/src/user_impersonate2/app/views/user_impersonate/impersonate/index.html.erb within layouts/user_impersonate/application (2.3ms)
1366
+ Completed 200 OK in 5ms (Views: 2.8ms | ActiveRecord: 0.6ms)
1367
+ Started GET "/impersonate/user/2" for 127.0.0.1 at 2014-03-18 18:55:43 -0700
1368
+ Processing by UserImpersonate::ImpersonateController#create as HTML
1369
+ Parameters: {"user_id"=>"2"}
1370
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
1371
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "2"]]
1372
+ SQL (0.2ms) UPDATE "users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 2 [["last_sign_in_at", Wed, 19 Mar 2014 01:55:43 UTC +00:00], ["current_sign_in_at", Wed, 19 Mar 2014 01:55:43 UTC +00:00], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", Wed, 19 Mar 2014 01:55:43 UTC +00:00]]
1373
+ Redirected to http://www.example.com/
1374
+ Completed 302 Found in 3ms (ActiveRecord: 0.5ms)
1375
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:55:43 -0700
1376
+ Processing by HomeController#index as HTML
1377
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
1378
+ Rendered home/index.html.erb within layouts/application (0.8ms)
1379
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
1380
+ Rendered user_impersonate/_header.html.erb (1.2ms)
1381
+ Completed 200 OK in 4ms (Views: 3.3ms | ActiveRecord: 0.2ms)
1382
+ Started DELETE "/impersonate/revert" for 127.0.0.1 at 2014-03-18 18:55:43 -0700
1383
+ Processing by UserImpersonate::ImpersonateController#destroy as HTML
1384
+ Parameters: {"utf8"=>"✓"}
1385
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
1386
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
1387
+ SQL (0.2ms) UPDATE "users" SET "current_sign_in_at" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 1 [["current_sign_in_at", Wed, 19 Mar 2014 01:55:43 UTC +00:00], ["sign_in_count", 2], ["updated_at", Wed, 19 Mar 2014 01:55:43 UTC +00:00]]
1388
+ Redirected to http://www.example.com/
1389
+ Completed 302 Found in 3ms (ActiveRecord: 0.4ms)
1390
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:55:43 -0700
1391
+ Processing by HomeController#index as HTML
1392
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
1393
+ Rendered home/index.html.erb within layouts/application (1.0ms)
1394
+ Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.1ms)
1395
+  (0.2ms) rollback transaction
1396
+  (0.4ms) begin transaction
1397
+ -------------------------------------------------------------------------------------
1398
+ UserImpersonate::ImpersonateControllerTest: test_create_should_require_authentication
1399
+ -------------------------------------------------------------------------------------
1400
+ Processing by UserImpersonate::ImpersonateController#create as HTML
1401
+ Completed 401 Unauthorized in 10ms
1402
+ Rendered text template (0.0ms)
1403
+  (0.1ms) rollback transaction
1404
+  (0.1ms) begin transaction
1405
+ ------------------------------------------------------------------------------------------
1406
+ UserImpersonate::ImpersonateControllerTest: test_destroy_should_not_require_authentication
1407
+ ------------------------------------------------------------------------------------------
1408
+ Processing by UserImpersonate::ImpersonateController#destroy as HTML
1409
+ Redirected to http://test.host/
1410
+ Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
1411
+  (0.1ms) rollback transaction
1412
+  (0.1ms) begin transaction
1413
+ ------------------------------------------------------------------------------------
1414
+ UserImpersonate::ImpersonateControllerTest: test_index_should_require_authentication
1415
+ ------------------------------------------------------------------------------------
1416
+ Processing by UserImpersonate::ImpersonateController#index as HTML
1417
+ Completed 401 Unauthorized in 0ms
1418
+  (0.1ms) rollback transaction
1419
+  (0.1ms) begin transaction
1420
+ -------------------------------
1421
+ UserImpersonateTest: test_truth
1422
+ -------------------------------
1423
+  (0.1ms) rollback transaction
1424
+  (32.8ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) DEFAULT '' NOT NULL, "email" varchar(255) DEFAULT '' NOT NULL, "encrypted_password" varchar(255) DEFAULT '' NOT NULL, "reset_password_token" varchar(255), "reset_password_sent_at" datetime, "remember_created_at" datetime, "sign_in_count" integer DEFAULT 0, "current_sign_in_at" datetime, "last_sign_in_at" datetime, "current_sign_in_ip" varchar(255), "last_sign_in_ip" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL, "staff" boolean DEFAULT 'f') 
1425
+  (26.1ms) CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
1426
+  (36.0ms) CREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")
1427
+  (35.5ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
1428
+  (18.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
1429
+  (0.3ms) SELECT version FROM "schema_migrations"
1430
+  (19.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120914184123')
1431
+  (18.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20120914174453')
1432
+  (0.3ms) begin transaction
1433
+  (0.0ms) commit transaction
1434
+  (0.0ms) begin transaction
1435
+  (0.1ms) SAVEPOINT active_record_1
1436
+ Fixture Delete (0.1ms) DELETE FROM "users"
1437
+ Fixture Insert (0.2ms) INSERT INTO "users" ("id", "name", "email", "staff", "encrypted_password", "created_at", "updated_at") VALUES (1, 'Dr Nic Williams', 'drnicwilliams@gmail.com', 't', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2014-03-19 01:56:14', '2014-03-19 01:56:14')
1438
+ Fixture Insert (0.1ms) INSERT INTO "users" ("id", "name", "email", "encrypted_password", "created_at", "updated_at") VALUES (2, 'Normal User', 'normaluser@gmail.com', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2014-03-19 01:56:14', '2014-03-19 01:56:14')
1439
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1440
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."name" = 'Normal User' LIMIT 1
1441
+ Started GET "/users/sign_in" for 127.0.0.1 at 2014-03-18 18:56:14 -0700
1442
+ Processing by Devise::SessionsController#new as HTML
1443
+ Rendered /home/rcook/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/devise-3.2.2/app/views/devise/shared/_links.erb (1.1ms)
1444
+ Rendered /home/rcook/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/devise-3.2.2/app/views/devise/sessions/new.html.erb within layouts/application (15.5ms)
1445
+ Completed 200 OK in 80ms (Views: 57.7ms | ActiveRecord: 0.0ms)
1446
+ Started POST "/users/sign_in" for 127.0.0.1 at 2014-03-18 18:56:15 -0700
1447
+ Processing by Devise::SessionsController#create as HTML
1448
+ Parameters: {"utf8"=>"✓", "user"=>{"email"=>"normaluser@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign in"}
1449
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."email" = 'normaluser@gmail.com' ORDER BY "users"."id" ASC LIMIT 1
1450
+ SQL (0.9ms) UPDATE "users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 2 [["last_sign_in_at", Wed, 19 Mar 2014 01:56:15 UTC +00:00], ["current_sign_in_at", Wed, 19 Mar 2014 01:56:15 UTC +00:00], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", Wed, 19 Mar 2014 01:56:15 UTC +00:00]]
1451
+ Redirected to http://www.example.com/
1452
+ Completed 302 Found in 82ms (ActiveRecord: 1.1ms)
1453
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:56:15 -0700
1454
+ Processing by HomeController#index as HTML
1455
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
1456
+ Rendered home/index.html.erb within layouts/application (1.8ms)
1457
+ Completed 200 OK in 4ms (Views: 3.1ms | ActiveRecord: 0.2ms)
1458
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:56:15 -0700
1459
+ Processing by HomeController#index as HTML
1460
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
1461
+ Rendered home/index.html.erb within layouts/application (1.0ms)
1462
+ Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.1ms)
1463
+ Started GET "/impersonate" for 127.0.0.1 at 2014-03-18 18:56:15 -0700
1464
+ Processing by UserImpersonate::ImpersonateController#index as HTML
1465
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
1466
+ Redirected to
1467
+ Redirected to http://www.example.com/
1468
+ Filter chain halted as :current_user_must_be_staff! rendered or redirected
1469
+ Completed 302 Found in 2ms (ActiveRecord: 0.2ms)
1470
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:56:15 -0700
1471
+ Processing by HomeController#index as HTML
1472
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
1473
+ Rendered home/index.html.erb within layouts/application (0.9ms)
1474
+ Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.1ms)
1475
+  (0.2ms) rollback transaction
1476
+  (0.1ms) begin transaction
1477
+  (0.0ms) commit transaction
1478
+  (0.0ms) begin transaction
1479
+  (0.0ms) SAVEPOINT active_record_1
1480
+ Fixture Delete (0.1ms) DELETE FROM "users"
1481
+ Fixture Insert (0.1ms) INSERT INTO "users" ("id", "name", "email", "staff", "encrypted_password", "created_at", "updated_at") VALUES (1, 'Dr Nic Williams', 'drnicwilliams@gmail.com', 't', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2014-03-19 01:56:15', '2014-03-19 01:56:15')
1482
+ Fixture Insert (0.1ms) INSERT INTO "users" ("id", "name", "email", "encrypted_password", "created_at", "updated_at") VALUES (2, 'Normal User', 'normaluser@gmail.com', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2014-03-19 01:56:15', '2014-03-19 01:56:15')
1483
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1484
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."name" = 'Dr Nic Williams' LIMIT 1
1485
+ Started GET "/users/sign_in" for 127.0.0.1 at 2014-03-18 18:56:15 -0700
1486
+ Processing by Devise::SessionsController#new as HTML
1487
+ Rendered /home/rcook/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/devise-3.2.2/app/views/devise/shared/_links.erb (0.3ms)
1488
+ Rendered /home/rcook/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/devise-3.2.2/app/views/devise/sessions/new.html.erb within layouts/application (2.3ms)
1489
+ Completed 200 OK in 4ms (Views: 3.2ms | ActiveRecord: 0.0ms)
1490
+ Started POST "/users/sign_in" for 127.0.0.1 at 2014-03-18 18:56:15 -0700
1491
+ Processing by Devise::SessionsController#create as HTML
1492
+ Parameters: {"utf8"=>"✓", "user"=>{"email"=>"drnicwilliams@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign in"}
1493
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = 'drnicwilliams@gmail.com' ORDER BY "users"."id" ASC LIMIT 1
1494
+ SQL (0.4ms) UPDATE "users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 1 [["last_sign_in_at", Wed, 19 Mar 2014 01:56:15 UTC +00:00], ["current_sign_in_at", Wed, 19 Mar 2014 01:56:15 UTC +00:00], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", Wed, 19 Mar 2014 01:56:15 UTC +00:00]]
1495
+ Redirected to http://www.example.com/
1496
+ Completed 302 Found in 78ms (ActiveRecord: 0.5ms)
1497
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:56:15 -0700
1498
+ Processing by HomeController#index as HTML
1499
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
1500
+ Rendered home/index.html.erb within layouts/application (1.4ms)
1501
+ Completed 200 OK in 2ms (Views: 2.0ms | ActiveRecord: 0.1ms)
1502
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:56:15 -0700
1503
+ Processing by HomeController#index as HTML
1504
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
1505
+ Rendered home/index.html.erb within layouts/application (1.4ms)
1506
+ Completed 200 OK in 2ms (Views: 1.9ms | ActiveRecord: 0.1ms)
1507
+ Started GET "/impersonate" for 127.0.0.1 at 2014-03-18 18:56:15 -0700
1508
+ Processing by UserImpersonate::ImpersonateController#index as HTML
1509
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
1510
+  (0.1ms) SELECT COUNT(*) FROM "users" WHERE ("users"."id" NOT IN (1))
1511
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE ("users"."id" NOT IN (1)) ORDER BY updated_at DESC
1512
+ Rendered /home/rcook/src/user_impersonate2/app/views/user_impersonate/impersonate/index.html.erb within layouts/user_impersonate/application (5.8ms)
1513
+ Completed 200 OK in 14ms (Views: 11.9ms | ActiveRecord: 0.4ms)
1514
+ Started GET "/impersonate/?utf8=%E2%9C%93&search=Normal+User" for 127.0.0.1 at 2014-03-18 18:56:15 -0700
1515
+ Processing by UserImpersonate::ImpersonateController#index as HTML
1516
+ Parameters: {"utf8"=>"✓", "search"=>"Normal User"}
1517
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
1518
+  (0.1ms) SELECT COUNT(*) FROM "users" WHERE ("users"."id" NOT IN (1)) AND (name like '%Normal User%')
1519
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE ("users"."id" NOT IN (1)) AND (name like '%Normal User%') ORDER BY updated_at DESC
1520
+ Rendered /home/rcook/src/user_impersonate2/app/views/user_impersonate/impersonate/index.html.erb within layouts/user_impersonate/application (1.4ms)
1521
+ Completed 200 OK in 4ms (Views: 1.9ms | ActiveRecord: 0.4ms)
1522
+ Started GET "/impersonate/user/2" for 127.0.0.1 at 2014-03-18 18:56:15 -0700
1523
+ Processing by UserImpersonate::ImpersonateController#create as HTML
1524
+ Parameters: {"user_id"=>"2"}
1525
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
1526
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "2"]]
1527
+ SQL (0.2ms) UPDATE "users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 2 [["last_sign_in_at", Wed, 19 Mar 2014 01:56:15 UTC +00:00], ["current_sign_in_at", Wed, 19 Mar 2014 01:56:15 UTC +00:00], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", Wed, 19 Mar 2014 01:56:15 UTC +00:00]]
1528
+ Redirected to http://www.example.com/
1529
+ Completed 302 Found in 3ms (ActiveRecord: 0.4ms)
1530
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:56:15 -0700
1531
+ Processing by HomeController#index as HTML
1532
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
1533
+ Rendered home/index.html.erb within layouts/application (1.1ms)
1534
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
1535
+ Rendered user_impersonate/_header.html.erb (1.4ms)
1536
+ Completed 200 OK in 4ms (Views: 3.9ms | ActiveRecord: 0.2ms)
1537
+ Started DELETE "/impersonate/revert" for 127.0.0.1 at 2014-03-18 18:56:15 -0700
1538
+ Processing by UserImpersonate::ImpersonateController#destroy as HTML
1539
+ Parameters: {"utf8"=>"✓"}
1540
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
1541
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
1542
+ SQL (0.2ms) UPDATE "users" SET "current_sign_in_at" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 1 [["current_sign_in_at", Wed, 19 Mar 2014 01:56:15 UTC +00:00], ["sign_in_count", 2], ["updated_at", Wed, 19 Mar 2014 01:56:15 UTC +00:00]]
1543
+ Redirected to http://www.example.com/
1544
+ Completed 302 Found in 4ms (ActiveRecord: 0.5ms)
1545
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:56:15 -0700
1546
+ Processing by HomeController#index as HTML
1547
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
1548
+ Rendered home/index.html.erb within layouts/application (1.2ms)
1549
+ Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.1ms)
1550
+  (0.2ms) rollback transaction
1551
+  (0.3ms) begin transaction
1552
+ -------------------------------------------------------------------------------------
1553
+ UserImpersonate::ImpersonateControllerTest: test_create_should_require_authentication
1554
+ -------------------------------------------------------------------------------------
1555
+ Processing by UserImpersonate::ImpersonateController#create as HTML
1556
+ Completed 401 Unauthorized in 10ms
1557
+ Rendered text template (0.0ms)
1558
+  (0.1ms) rollback transaction
1559
+  (0.0ms) begin transaction
1560
+ ------------------------------------------------------------------------------------------
1561
+ UserImpersonate::ImpersonateControllerTest: test_destroy_should_not_require_authentication
1562
+ ------------------------------------------------------------------------------------------
1563
+ Processing by UserImpersonate::ImpersonateController#destroy as HTML
1564
+ Redirected to http://test.host/
1565
+ Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
1566
+  (0.1ms) rollback transaction
1567
+  (0.0ms) begin transaction
1568
+ ------------------------------------------------------------------------------------
1569
+ UserImpersonate::ImpersonateControllerTest: test_index_should_require_authentication
1570
+ ------------------------------------------------------------------------------------
1571
+ Processing by UserImpersonate::ImpersonateController#index as HTML
1572
+ Completed 401 Unauthorized in 0ms
1573
+  (0.1ms) rollback transaction
1574
+  (0.1ms) begin transaction
1575
+ -------------------------------
1576
+ UserImpersonateTest: test_truth
1577
+ -------------------------------
1578
+  (0.0ms) rollback transaction
1579
+  (17.7ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) DEFAULT '' NOT NULL, "email" varchar(255) DEFAULT '' NOT NULL, "encrypted_password" varchar(255) DEFAULT '' NOT NULL, "reset_password_token" varchar(255), "reset_password_sent_at" datetime, "remember_created_at" datetime, "sign_in_count" integer DEFAULT 0, "current_sign_in_at" datetime, "last_sign_in_at" datetime, "current_sign_in_ip" varchar(255), "last_sign_in_ip" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL, "staff" boolean DEFAULT 'f') 
1580
+  (40.0ms) CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
1581
+  (24.8ms) CREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")
1582
+  (29.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
1583
+  (26.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
1584
+  (0.2ms) SELECT version FROM "schema_migrations"
1585
+  (17.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20120914184123')
1586
+  (17.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20120914174453')
1587
+  (0.3ms) begin transaction
1588
+  (0.0ms) commit transaction
1589
+  (0.0ms) begin transaction
1590
+  (0.1ms) SAVEPOINT active_record_1
1591
+ Fixture Delete (0.1ms) DELETE FROM "users"
1592
+ Fixture Insert (0.1ms) INSERT INTO "users" ("id", "name", "email", "staff", "encrypted_password", "created_at", "updated_at") VALUES (1, 'Dr Nic Williams', 'drnicwilliams@gmail.com', 't', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2014-03-19 01:56:23', '2014-03-19 01:56:23')
1593
+ Fixture Insert (0.1ms) INSERT INTO "users" ("id", "name", "email", "encrypted_password", "created_at", "updated_at") VALUES (2, 'Normal User', 'normaluser@gmail.com', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2014-03-19 01:56:23', '2014-03-19 01:56:23')
1594
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1595
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."name" = 'Normal User' LIMIT 1
1596
+ Started GET "/users/sign_in" for 127.0.0.1 at 2014-03-18 18:56:23 -0700
1597
+ Processing by Devise::SessionsController#new as HTML
1598
+ Rendered /home/rcook/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/devise-3.2.2/app/views/devise/shared/_links.erb (1.1ms)
1599
+ Rendered /home/rcook/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/devise-3.2.2/app/views/devise/sessions/new.html.erb within layouts/application (16.2ms)
1600
+ Completed 200 OK in 53ms (Views: 31.4ms | ActiveRecord: 0.0ms)
1601
+ Started POST "/users/sign_in" for 127.0.0.1 at 2014-03-18 18:56:24 -0700
1602
+ Processing by Devise::SessionsController#create as HTML
1603
+ Parameters: {"utf8"=>"✓", "user"=>{"email"=>"normaluser@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign in"}
1604
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."email" = 'normaluser@gmail.com' ORDER BY "users"."id" ASC LIMIT 1
1605
+ SQL (0.9ms) UPDATE "users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 2 [["last_sign_in_at", Wed, 19 Mar 2014 01:56:24 UTC +00:00], ["current_sign_in_at", Wed, 19 Mar 2014 01:56:24 UTC +00:00], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", Wed, 19 Mar 2014 01:56:24 UTC +00:00]]
1606
+ Redirected to http://www.example.com/
1607
+ Completed 302 Found in 81ms (ActiveRecord: 1.1ms)
1608
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:56:24 -0700
1609
+ Processing by HomeController#index as HTML
1610
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
1611
+ Rendered home/index.html.erb within layouts/application (1.5ms)
1612
+ Completed 200 OK in 3ms (Views: 2.8ms | ActiveRecord: 0.2ms)
1613
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:56:24 -0700
1614
+ Processing by HomeController#index as HTML
1615
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
1616
+ Rendered home/index.html.erb within layouts/application (0.9ms)
1617
+ Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.1ms)
1618
+ Started GET "/impersonate" for 127.0.0.1 at 2014-03-18 18:56:24 -0700
1619
+ Processing by UserImpersonate::ImpersonateController#index as HTML
1620
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
1621
+ Redirected to
1622
+ Redirected to http://www.example.com/
1623
+ Filter chain halted as :current_user_must_be_staff! rendered or redirected
1624
+ Completed 302 Found in 2ms (ActiveRecord: 0.1ms)
1625
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:56:24 -0700
1626
+ Processing by HomeController#index as HTML
1627
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
1628
+ Rendered home/index.html.erb within layouts/application (0.8ms)
1629
+ Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.1ms)
1630
+  (0.1ms) rollback transaction
1631
+  (0.0ms) begin transaction
1632
+  (0.0ms) commit transaction
1633
+  (0.0ms) begin transaction
1634
+  (0.0ms) SAVEPOINT active_record_1
1635
+ Fixture Delete (0.1ms) DELETE FROM "users"
1636
+ Fixture Insert (0.1ms) INSERT INTO "users" ("id", "name", "email", "staff", "encrypted_password", "created_at", "updated_at") VALUES (1, 'Dr Nic Williams', 'drnicwilliams@gmail.com', 't', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2014-03-19 01:56:24', '2014-03-19 01:56:24')
1637
+ Fixture Insert (0.1ms) INSERT INTO "users" ("id", "name", "email", "encrypted_password", "created_at", "updated_at") VALUES (2, 'Normal User', 'normaluser@gmail.com', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2014-03-19 01:56:24', '2014-03-19 01:56:24')
1638
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1639
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."name" = 'Dr Nic Williams' LIMIT 1
1640
+ Started GET "/users/sign_in" for 127.0.0.1 at 2014-03-18 18:56:24 -0700
1641
+ Processing by Devise::SessionsController#new as HTML
1642
+ Rendered /home/rcook/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/devise-3.2.2/app/views/devise/shared/_links.erb (0.3ms)
1643
+ Rendered /home/rcook/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/devise-3.2.2/app/views/devise/sessions/new.html.erb within layouts/application (1.9ms)
1644
+ Completed 200 OK in 3ms (Views: 2.7ms | ActiveRecord: 0.0ms)
1645
+ Started POST "/users/sign_in" for 127.0.0.1 at 2014-03-18 18:56:24 -0700
1646
+ Processing by Devise::SessionsController#create as HTML
1647
+ Parameters: {"utf8"=>"✓", "user"=>{"email"=>"drnicwilliams@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign in"}
1648
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."email" = 'drnicwilliams@gmail.com' ORDER BY "users"."id" ASC LIMIT 1
1649
+ SQL (0.4ms) UPDATE "users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 1 [["last_sign_in_at", Wed, 19 Mar 2014 01:56:24 UTC +00:00], ["current_sign_in_at", Wed, 19 Mar 2014 01:56:24 UTC +00:00], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", Wed, 19 Mar 2014 01:56:24 UTC +00:00]]
1650
+ Redirected to http://www.example.com/
1651
+ Completed 302 Found in 79ms (ActiveRecord: 0.6ms)
1652
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:56:24 -0700
1653
+ Processing by HomeController#index as HTML
1654
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
1655
+ Rendered home/index.html.erb within layouts/application (1.2ms)
1656
+ Completed 200 OK in 2ms (Views: 1.7ms | ActiveRecord: 0.1ms)
1657
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:56:24 -0700
1658
+ Processing by HomeController#index as HTML
1659
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
1660
+ Rendered home/index.html.erb within layouts/application (1.4ms)
1661
+ Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.1ms)
1662
+ Started GET "/impersonate" for 127.0.0.1 at 2014-03-18 18:56:24 -0700
1663
+ Processing by UserImpersonate::ImpersonateController#index as HTML
1664
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
1665
+  (0.1ms) SELECT COUNT(*) FROM "users" WHERE ("users"."id" NOT IN (1))
1666
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE ("users"."id" NOT IN (1)) ORDER BY updated_at DESC
1667
+ Rendered /home/rcook/src/user_impersonate2/app/views/user_impersonate/impersonate/index.html.erb within layouts/user_impersonate/application (2.7ms)
1668
+ Completed 200 OK in 11ms (Views: 8.9ms | ActiveRecord: 0.4ms)
1669
+ Started GET "/impersonate/?utf8=%E2%9C%93&search=Normal+User" for 127.0.0.1 at 2014-03-18 18:56:24 -0700
1670
+ Processing by UserImpersonate::ImpersonateController#index as HTML
1671
+ Parameters: {"utf8"=>"✓", "search"=>"Normal User"}
1672
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
1673
+  (0.1ms) SELECT COUNT(*) FROM "users" WHERE ("users"."id" NOT IN (1)) AND (name like '%Normal User%')
1674
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE ("users"."id" NOT IN (1)) AND (name like '%Normal User%') ORDER BY updated_at DESC
1675
+ Rendered /home/rcook/src/user_impersonate2/app/views/user_impersonate/impersonate/index.html.erb within layouts/user_impersonate/application (1.4ms)
1676
+ Completed 200 OK in 3ms (Views: 1.8ms | ActiveRecord: 0.4ms)
1677
+ Started GET "/impersonate/user/2" for 127.0.0.1 at 2014-03-18 18:56:24 -0700
1678
+ Processing by UserImpersonate::ImpersonateController#create as HTML
1679
+ Parameters: {"user_id"=>"2"}
1680
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
1681
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "2"]]
1682
+ SQL (0.1ms) UPDATE "users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 2 [["last_sign_in_at", Wed, 19 Mar 2014 01:56:24 UTC +00:00], ["current_sign_in_at", Wed, 19 Mar 2014 01:56:24 UTC +00:00], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", Wed, 19 Mar 2014 01:56:24 UTC +00:00]]
1683
+ Redirected to http://www.example.com/
1684
+ Completed 302 Found in 3ms (ActiveRecord: 0.4ms)
1685
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:56:24 -0700
1686
+ Processing by HomeController#index as HTML
1687
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
1688
+ Rendered home/index.html.erb within layouts/application (1.6ms)
1689
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
1690
+ Rendered user_impersonate/_header.html.erb (2.2ms)
1691
+ Completed 200 OK in 7ms (Views: 6.1ms | ActiveRecord: 0.4ms)
1692
+ Started DELETE "/impersonate/revert" for 127.0.0.1 at 2014-03-18 18:56:24 -0700
1693
+ Processing by UserImpersonate::ImpersonateController#destroy as HTML
1694
+ Parameters: {"utf8"=>"✓"}
1695
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
1696
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
1697
+ SQL (0.2ms) UPDATE "users" SET "current_sign_in_at" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 1 [["current_sign_in_at", Wed, 19 Mar 2014 01:56:24 UTC +00:00], ["sign_in_count", 2], ["updated_at", Wed, 19 Mar 2014 01:56:24 UTC +00:00]]
1698
+ Redirected to http://www.example.com/
1699
+ Completed 302 Found in 3ms (ActiveRecord: 0.4ms)
1700
+ Started GET "/" for 127.0.0.1 at 2014-03-18 18:56:24 -0700
1701
+ Processing by HomeController#index as HTML
1702
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
1703
+ Rendered home/index.html.erb within layouts/application (1.4ms)
1704
+ Completed 200 OK in 2ms (Views: 1.9ms | ActiveRecord: 0.2ms)
1705
+  (0.1ms) rollback transaction
1706
+  (0.3ms) begin transaction
1707
+ -------------------------------------------------------------------------------------------------
1708
+ UserImpersonate::ImpersonateControllerTest: test_configuration_to_use_a_different_model_than_User
1709
+ -------------------------------------------------------------------------------------------------
1710
+ Processing by UserImpersonate::ImpersonateController#index as HTML
1711
+ Redirected to
1712
+ Redirected to http://test.host/
1713
+ Filter chain halted as :current_user_must_be_staff! rendered or redirected
1714
+ Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
1715
+  (0.1ms) rollback transaction
1716
+  (0.1ms) begin transaction
1717
+ --------------------------------------------------------------------------------------
1718
+ UserImpersonate::ImpersonateControllerTest: test_configuration_uses_default_model_User
1719
+ --------------------------------------------------------------------------------------
1720
+ Processing by UserImpersonate::ImpersonateController#index as HTML
1721
+ Redirected to
1722
+ Redirected to http://test.host/
1723
+ Filter chain halted as :current_user_must_be_staff! rendered or redirected
1724
+ Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
1725
+  (0.1ms) rollback transaction
1726
+  (0.0ms) begin transaction
1727
+ -------------------------------------------------------------------------------------
1728
+ UserImpersonate::ImpersonateControllerTest: test_create_should_require_authentication
1729
+ -------------------------------------------------------------------------------------
1730
+ Processing by UserImpersonate::ImpersonateController#create as HTML
1731
+ Completed 401 Unauthorized in 11ms
1732
+  (0.1ms) rollback transaction
1733
+  (0.0ms) begin transaction
1734
+ ------------------------------------------------------------------------------------------
1735
+ UserImpersonate::ImpersonateControllerTest: test_destroy_should_not_require_authentication
1736
+ ------------------------------------------------------------------------------------------
1737
+ Processing by UserImpersonate::ImpersonateController#destroy as HTML
1738
+ Redirected to http://test.host/
1739
+ Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
1740
+  (0.1ms) rollback transaction
1741
+  (0.0ms) begin transaction
1742
+ ------------------------------------------------------------------------------------
1743
+ UserImpersonate::ImpersonateControllerTest: test_index_should_require_authentication
1744
+ ------------------------------------------------------------------------------------
1745
+ Processing by UserImpersonate::ImpersonateController#index as HTML
1746
+ Completed 401 Unauthorized in 0ms
1747
+  (0.1ms) rollback transaction
1748
+  (0.0ms) begin transaction
1749
+ -------------------------------
1750
+ UserImpersonateTest: test_truth
1751
+ -------------------------------
1752
+  (0.1ms) rollback transaction
1753
+  (19.3ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) DEFAULT '' NOT NULL, "email" varchar(255) DEFAULT '' NOT NULL, "encrypted_password" varchar(255) DEFAULT '' NOT NULL, "reset_password_token" varchar(255), "reset_password_sent_at" datetime, "remember_created_at" datetime, "sign_in_count" integer DEFAULT 0, "current_sign_in_at" datetime, "last_sign_in_at" datetime, "current_sign_in_ip" varchar(255), "last_sign_in_ip" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL, "staff" boolean DEFAULT 'f') 
1754
+  (15.1ms) CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
1755
+  (16.5ms) CREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")
1756
+  (20.8ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
1757
+  (15.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
1758
+  (0.1ms) SELECT version FROM "schema_migrations"
1759
+  (22.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20120914184123')
1760
+  (32.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20120914174453')
1761
+  (0.3ms) begin transaction
1762
+  (0.1ms) commit transaction
1763
+  (0.0ms) begin transaction
1764
+  (0.1ms) SAVEPOINT active_record_1
1765
+ Fixture Delete (0.1ms) DELETE FROM "users"
1766
+ Fixture Insert (0.1ms) INSERT INTO "users" ("id", "name", "email", "staff", "encrypted_password", "created_at", "updated_at") VALUES (1, 'Dr Nic Williams', 'drnicwilliams@gmail.com', 't', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2014-04-09 05:45:02', '2014-04-09 05:45:02')
1767
+ Fixture Insert (0.1ms) INSERT INTO "users" ("id", "name", "email", "encrypted_password", "created_at", "updated_at") VALUES (2, 'Normal User', 'normaluser@gmail.com', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2014-04-09 05:45:02', '2014-04-09 05:45:02')
1768
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1769
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."name" = 'Normal User' LIMIT 1
1770
+ Started GET "/users/sign_in" for 127.0.0.1 at 2014-04-08 22:45:02 -0700
1771
+ Processing by Devise::SessionsController#new as HTML
1772
+ Rendered /home/rcook/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/devise-3.2.2/app/views/devise/shared/_links.erb (1.3ms)
1773
+ Rendered /home/rcook/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/devise-3.2.2/app/views/devise/sessions/new.html.erb within layouts/application (54.4ms)
1774
+ Completed 200 OK in 98ms (Views: 76.5ms | ActiveRecord: 0.0ms)
1775
+ Started POST "/users/sign_in" for 127.0.0.1 at 2014-04-08 22:45:02 -0700
1776
+ Processing by Devise::SessionsController#create as HTML
1777
+ Parameters: {"utf8"=>"✓", "user"=>{"email"=>"normaluser@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign in"}
1778
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."email" = 'normaluser@gmail.com' ORDER BY "users"."id" ASC LIMIT 1
1779
+ SQL (2.6ms) UPDATE "users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 2 [["last_sign_in_at", Wed, 09 Apr 2014 05:45:02 UTC +00:00], ["current_sign_in_at", Wed, 09 Apr 2014 05:45:02 UTC +00:00], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", Wed, 09 Apr 2014 05:45:02 UTC +00:00]]
1780
+ Redirected to http://www.example.com/
1781
+ Completed 302 Found in 79ms (ActiveRecord: 2.7ms)
1782
+ Started GET "/" for 127.0.0.1 at 2014-04-08 22:45:02 -0700
1783
+ Processing by HomeController#index as HTML
1784
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
1785
+ Rendered home/index.html.erb within layouts/application (1.7ms)
1786
+ Completed 200 OK in 3ms (Views: 3.1ms | ActiveRecord: 0.1ms)
1787
+ Started GET "/" for 127.0.0.1 at 2014-04-08 22:45:02 -0700
1788
+ Processing by HomeController#index as HTML
1789
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
1790
+ Rendered home/index.html.erb within layouts/application (1.1ms)
1791
+ Completed 200 OK in 2ms (Views: 1.6ms | ActiveRecord: 0.2ms)
1792
+ Started GET "/impersonate" for 127.0.0.1 at 2014-04-08 22:45:02 -0700
1793
+ Processing by UserImpersonate::ImpersonateController#index as HTML
1794
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
1795
+ Redirected to
1796
+ Redirected to http://www.example.com/
1797
+ Filter chain halted as :current_user_must_be_staff! rendered or redirected
1798
+ Completed 302 Found in 2ms (ActiveRecord: 0.2ms)
1799
+ Started GET "/" for 127.0.0.1 at 2014-04-08 22:45:02 -0700
1800
+ Processing by HomeController#index as HTML
1801
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
1802
+ Rendered home/index.html.erb within layouts/application (0.9ms)
1803
+ Completed 200 OK in 2ms (Views: 1.6ms | ActiveRecord: 0.1ms)
1804
+  (0.5ms) rollback transaction
1805
+  (0.2ms) begin transaction
1806
+  (0.1ms) commit transaction
1807
+  (0.0ms) begin transaction
1808
+  (0.0ms) SAVEPOINT active_record_1
1809
+ Fixture Delete (0.3ms) DELETE FROM "users"
1810
+ Fixture Insert (0.1ms) INSERT INTO "users" ("id", "name", "email", "staff", "encrypted_password", "created_at", "updated_at") VALUES (1, 'Dr Nic Williams', 'drnicwilliams@gmail.com', 't', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2014-04-09 05:45:02', '2014-04-09 05:45:02')
1811
+ Fixture Insert (0.1ms) INSERT INTO "users" ("id", "name", "email", "encrypted_password", "created_at", "updated_at") VALUES (2, 'Normal User', 'normaluser@gmail.com', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2014-04-09 05:45:02', '2014-04-09 05:45:02')
1812
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1813
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."name" = 'Dr Nic Williams' LIMIT 1
1814
+ Started GET "/users/sign_in" for 127.0.0.1 at 2014-04-08 22:45:02 -0700
1815
+ Processing by Devise::SessionsController#new as HTML
1816
+ Rendered /home/rcook/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/devise-3.2.2/app/views/devise/shared/_links.erb (0.3ms)
1817
+ Rendered /home/rcook/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/devise-3.2.2/app/views/devise/sessions/new.html.erb within layouts/application (2.3ms)
1818
+ Completed 200 OK in 5ms (Views: 3.1ms | ActiveRecord: 0.0ms)
1819
+ Started POST "/users/sign_in" for 127.0.0.1 at 2014-04-08 22:45:02 -0700
1820
+ Processing by Devise::SessionsController#create as HTML
1821
+ Parameters: {"utf8"=>"✓", "user"=>{"email"=>"drnicwilliams@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign in"}
1822
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."email" = 'drnicwilliams@gmail.com' ORDER BY "users"."id" ASC LIMIT 1
1823
+ SQL (0.4ms) UPDATE "users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 1 [["last_sign_in_at", Wed, 09 Apr 2014 05:45:02 UTC +00:00], ["current_sign_in_at", Wed, 09 Apr 2014 05:45:02 UTC +00:00], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", Wed, 09 Apr 2014 05:45:02 UTC +00:00]]
1824
+ Redirected to http://www.example.com/
1825
+ Completed 302 Found in 76ms (ActiveRecord: 0.6ms)
1826
+ Started GET "/" for 127.0.0.1 at 2014-04-08 22:45:02 -0700
1827
+ Processing by HomeController#index as HTML
1828
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
1829
+ Rendered home/index.html.erb within layouts/application (1.4ms)
1830
+ Completed 200 OK in 2ms (Views: 2.0ms | ActiveRecord: 0.1ms)
1831
+ Started GET "/" for 127.0.0.1 at 2014-04-08 22:45:02 -0700
1832
+ Processing by HomeController#index as HTML
1833
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
1834
+ Rendered home/index.html.erb within layouts/application (1.4ms)
1835
+ Completed 200 OK in 2ms (Views: 2.0ms | ActiveRecord: 0.1ms)
1836
+ Started GET "/impersonate" for 127.0.0.1 at 2014-04-08 22:45:02 -0700
1837
+ Processing by UserImpersonate::ImpersonateController#index as HTML
1838
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
1839
+  (0.4ms) SELECT COUNT(*) FROM "users" WHERE ("users"."id" NOT IN (1))
1840
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE ("users"."id" NOT IN (1)) ORDER BY updated_at DESC
1841
+ Rendered /home/rcook/src/user_impersonate2/app/views/user_impersonate/impersonate/index.html.erb within layouts/user_impersonate/application (3.7ms)
1842
+ Completed 200 OK in 12ms (Views: 9.5ms | ActiveRecord: 0.7ms)
1843
+ Started GET "/impersonate/?utf8=%E2%9C%93&search=Normal+User" for 127.0.0.1 at 2014-04-08 22:45:02 -0700
1844
+ Processing by UserImpersonate::ImpersonateController#index as HTML
1845
+ Parameters: {"utf8"=>"✓", "search"=>"Normal User"}
1846
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
1847
+  (0.1ms) SELECT COUNT(*) FROM "users" WHERE ("users"."id" NOT IN (1)) AND (name like '%Normal User%')
1848
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE ("users"."id" NOT IN (1)) AND (name like '%Normal User%') ORDER BY updated_at DESC
1849
+ Rendered /home/rcook/src/user_impersonate2/app/views/user_impersonate/impersonate/index.html.erb within layouts/user_impersonate/application (37.5ms)
1850
+ Completed 200 OK in 41ms (Views: 38.3ms | ActiveRecord: 0.4ms)
1851
+ Started GET "/impersonate/user/2" for 127.0.0.1 at 2014-04-08 22:45:02 -0700
1852
+ Processing by UserImpersonate::ImpersonateController#create as HTML
1853
+ Parameters: {"user_id"=>"2"}
1854
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
1855
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "2"]]
1856
+ SQL (0.4ms) UPDATE "users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 2 [["last_sign_in_at", Wed, 09 Apr 2014 05:45:02 UTC +00:00], ["current_sign_in_at", Wed, 09 Apr 2014 05:45:02 UTC +00:00], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", Wed, 09 Apr 2014 05:45:02 UTC +00:00]]
1857
+ Redirected to http://www.example.com/
1858
+ Completed 302 Found in 6ms (ActiveRecord: 0.8ms)
1859
+ Started GET "/" for 127.0.0.1 at 2014-04-08 22:45:02 -0700
1860
+ Processing by HomeController#index as HTML
1861
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
1862
+ Rendered home/index.html.erb within layouts/application (1.1ms)
1863
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
1864
+ Rendered user_impersonate/_header.html.erb (1.5ms)
1865
+ Completed 200 OK in 4ms (Views: 4.0ms | ActiveRecord: 0.2ms)
1866
+ Started DELETE "/impersonate/revert" for 127.0.0.1 at 2014-04-08 22:45:02 -0700
1867
+ Processing by UserImpersonate::ImpersonateController#destroy as HTML
1868
+ Parameters: {"utf8"=>"✓"}
1869
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
1870
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
1871
+ SQL (0.2ms) UPDATE "users" SET "current_sign_in_at" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 1 [["current_sign_in_at", Wed, 09 Apr 2014 05:45:02 UTC +00:00], ["sign_in_count", 2], ["updated_at", Wed, 09 Apr 2014 05:45:02 UTC +00:00]]
1872
+ Redirected to http://www.example.com/
1873
+ Completed 302 Found in 3ms (ActiveRecord: 0.5ms)
1874
+ Started GET "/" for 127.0.0.1 at 2014-04-08 22:45:02 -0700
1875
+ Processing by HomeController#index as HTML
1876
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
1877
+ Rendered home/index.html.erb within layouts/application (1.0ms)
1878
+ Completed 200 OK in 2ms (Views: 1.7ms | ActiveRecord: 0.1ms)
1879
+  (0.2ms) rollback transaction
1880
+  (0.3ms) begin transaction
1881
+ -------------------------------------------------------------------------------------------------
1882
+ UserImpersonate::ImpersonateControllerTest: test_configuration_to_use_a_different_model_than_User
1883
+ -------------------------------------------------------------------------------------------------
1884
+ Processing by UserImpersonate::ImpersonateController#index as HTML
1885
+ Redirected to
1886
+ Redirected to http://test.host/
1887
+ Filter chain halted as :current_user_must_be_staff! rendered or redirected
1888
+ Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
1889
+  (0.1ms) rollback transaction
1890
+  (0.1ms) begin transaction
1891
+ --------------------------------------------------------------------------------------
1892
+ UserImpersonate::ImpersonateControllerTest: test_configuration_uses_default_model_User
1893
+ --------------------------------------------------------------------------------------
1894
+ Processing by UserImpersonate::ImpersonateController#index as HTML
1895
+ Redirected to
1896
+ Redirected to http://test.host/
1897
+ Filter chain halted as :current_user_must_be_staff! rendered or redirected
1898
+ Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
1899
+  (0.1ms) rollback transaction
1900
+  (0.0ms) begin transaction
1901
+ -------------------------------------------------------------------------------------
1902
+ UserImpersonate::ImpersonateControllerTest: test_create_should_require_authentication
1903
+ -------------------------------------------------------------------------------------
1904
+ Processing by UserImpersonate::ImpersonateController#create as HTML
1905
+ Completed 401 Unauthorized in 10ms
1906
+  (0.1ms) rollback transaction
1907
+  (0.0ms) begin transaction
1908
+ ------------------------------------------------------------------------------------------
1909
+ UserImpersonate::ImpersonateControllerTest: test_destroy_should_not_require_authentication
1910
+ ------------------------------------------------------------------------------------------
1911
+ Processing by UserImpersonate::ImpersonateController#destroy as HTML
1912
+ Redirected to http://test.host/
1913
+ Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
1914
+  (0.1ms) rollback transaction
1915
+  (0.0ms) begin transaction
1916
+ ------------------------------------------------------------------------------------
1917
+ UserImpersonate::ImpersonateControllerTest: test_index_should_require_authentication
1918
+ ------------------------------------------------------------------------------------
1919
+ Processing by UserImpersonate::ImpersonateController#index as HTML
1920
+ Completed 401 Unauthorized in 0ms
1921
+  (0.1ms) rollback transaction
1922
+  (0.1ms) begin transaction
1923
+ -------------------------------
1924
+ UserImpersonateTest: test_truth
1925
+ -------------------------------
1926
+  (0.1ms) rollback transaction
1927
+  (23.5ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) DEFAULT '' NOT NULL, "email" varchar(255) DEFAULT '' NOT NULL, "encrypted_password" varchar(255) DEFAULT '' NOT NULL, "reset_password_token" varchar(255), "reset_password_sent_at" datetime, "remember_created_at" datetime, "sign_in_count" integer DEFAULT 0, "current_sign_in_at" datetime, "last_sign_in_at" datetime, "current_sign_in_ip" varchar(255), "last_sign_in_ip" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL, "staff" boolean DEFAULT 'f') 
1928
+  (28.5ms) CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
1929
+  (25.2ms) CREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")
1930
+  (23.1ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
1931
+  (18.6ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
1932
+  (0.3ms) SELECT version FROM "schema_migrations"
1933
+  (21.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20120914184123')
1934
+  (18.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20120914174453')
1935
+  (0.3ms) begin transaction
1936
+  (0.1ms) commit transaction
1937
+  (0.0ms) begin transaction
1938
+  (0.1ms) SAVEPOINT active_record_1
1939
+ Fixture Delete (0.1ms) DELETE FROM "users"
1940
+ Fixture Insert (0.1ms) INSERT INTO "users" ("id", "name", "email", "staff", "encrypted_password", "created_at", "updated_at") VALUES (1, 'Dr Nic Williams', 'drnicwilliams@gmail.com', 't', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2014-04-09 05:45:33', '2014-04-09 05:45:33')
1941
+ Fixture Insert (0.1ms) INSERT INTO "users" ("id", "name", "email", "encrypted_password", "created_at", "updated_at") VALUES (2, 'Normal User', 'normaluser@gmail.com', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2014-04-09 05:45:33', '2014-04-09 05:45:33')
1942
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1943
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."name" = 'Normal User' LIMIT 1
1944
+ Started GET "/users/sign_in" for 127.0.0.1 at 2014-04-08 22:45:33 -0700
1945
+ Processing by Devise::SessionsController#new as HTML
1946
+ Rendered /home/rcook/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/devise-3.2.2/app/views/devise/shared/_links.erb (1.2ms)
1947
+ Rendered /home/rcook/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/devise-3.2.2/app/views/devise/sessions/new.html.erb within layouts/application (43.7ms)
1948
+ Completed 200 OK in 77ms (Views: 55.5ms | ActiveRecord: 0.0ms)
1949
+ Started POST "/users/sign_in" for 127.0.0.1 at 2014-04-08 22:45:34 -0700
1950
+ Processing by Devise::SessionsController#create as HTML
1951
+ Parameters: {"utf8"=>"✓", "user"=>{"email"=>"normaluser@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign in"}
1952
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."email" = 'normaluser@gmail.com' ORDER BY "users"."id" ASC LIMIT 1
1953
+ SQL (0.9ms) UPDATE "users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 2 [["last_sign_in_at", Wed, 09 Apr 2014 05:45:34 UTC +00:00], ["current_sign_in_at", Wed, 09 Apr 2014 05:45:34 UTC +00:00], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", Wed, 09 Apr 2014 05:45:34 UTC +00:00]]
1954
+ Redirected to http://www.example.com/
1955
+ Completed 302 Found in 82ms (ActiveRecord: 1.1ms)
1956
+ Started GET "/" for 127.0.0.1 at 2014-04-08 22:45:34 -0700
1957
+ Processing by HomeController#index as HTML
1958
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
1959
+ Rendered home/index.html.erb within layouts/application (1.8ms)
1960
+ Completed 200 OK in 4ms (Views: 3.1ms | ActiveRecord: 0.1ms)
1961
+ Started GET "/" for 127.0.0.1 at 2014-04-08 22:45:34 -0700
1962
+ Processing by HomeController#index as HTML
1963
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
1964
+ Rendered home/index.html.erb within layouts/application (1.2ms)
1965
+ Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.2ms)
1966
+ Started GET "/impersonate" for 127.0.0.1 at 2014-04-08 22:45:34 -0700
1967
+ Processing by UserImpersonate::ImpersonateController#index as HTML
1968
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
1969
+ Redirected to
1970
+ Redirected to http://www.example.com/
1971
+ Filter chain halted as :current_user_must_be_staff! rendered or redirected
1972
+ Completed 302 Found in 2ms (ActiveRecord: 0.2ms)
1973
+ Started GET "/" for 127.0.0.1 at 2014-04-08 22:45:34 -0700
1974
+ Processing by HomeController#index as HTML
1975
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
1976
+ Rendered home/index.html.erb within layouts/application (0.9ms)
1977
+ Completed 200 OK in 2ms (Views: 1.6ms | ActiveRecord: 0.1ms)
1978
+  (0.2ms) rollback transaction
1979
+  (0.1ms) begin transaction
1980
+  (0.0ms) commit transaction
1981
+  (0.0ms) begin transaction
1982
+  (0.0ms) SAVEPOINT active_record_1
1983
+ Fixture Delete (0.1ms) DELETE FROM "users"
1984
+ Fixture Insert (0.1ms) INSERT INTO "users" ("id", "name", "email", "staff", "encrypted_password", "created_at", "updated_at") VALUES (1, 'Dr Nic Williams', 'drnicwilliams@gmail.com', 't', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2014-04-09 05:45:34', '2014-04-09 05:45:34')
1985
+ Fixture Insert (0.1ms) INSERT INTO "users" ("id", "name", "email", "encrypted_password", "created_at", "updated_at") VALUES (2, 'Normal User', 'normaluser@gmail.com', '$2a$10$HV6E2Hgk2z6hqow76r6IL.5gcnqCSqJYuOuOT.nbqdPffBLvwglzK', '2014-04-09 05:45:34', '2014-04-09 05:45:34')
1986
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1987
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."name" = 'Dr Nic Williams' LIMIT 1
1988
+ Started GET "/users/sign_in" for 127.0.0.1 at 2014-04-08 22:45:34 -0700
1989
+ Processing by Devise::SessionsController#new as HTML
1990
+ Rendered /home/rcook/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/devise-3.2.2/app/views/devise/shared/_links.erb (0.3ms)
1991
+ Rendered /home/rcook/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/gems/devise-3.2.2/app/views/devise/sessions/new.html.erb within layouts/application (3.2ms)
1992
+ Completed 200 OK in 5ms (Views: 4.0ms | ActiveRecord: 0.0ms)
1993
+ Started POST "/users/sign_in" for 127.0.0.1 at 2014-04-08 22:45:34 -0700
1994
+ Processing by Devise::SessionsController#create as HTML
1995
+ Parameters: {"utf8"=>"✓", "user"=>{"email"=>"drnicwilliams@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign in"}
1996
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."email" = 'drnicwilliams@gmail.com' ORDER BY "users"."id" ASC LIMIT 1
1997
+ SQL (0.4ms) UPDATE "users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 1 [["last_sign_in_at", Wed, 09 Apr 2014 05:45:34 UTC +00:00], ["current_sign_in_at", Wed, 09 Apr 2014 05:45:34 UTC +00:00], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", Wed, 09 Apr 2014 05:45:34 UTC +00:00]]
1998
+ Redirected to http://www.example.com/
1999
+ Completed 302 Found in 81ms (ActiveRecord: 0.5ms)
2000
+ Started GET "/" for 127.0.0.1 at 2014-04-08 22:45:34 -0700
2001
+ Processing by HomeController#index as HTML
2002
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
2003
+ Rendered home/index.html.erb within layouts/application (1.5ms)
2004
+ Completed 200 OK in 2ms (Views: 2.1ms | ActiveRecord: 0.1ms)
2005
+ Started GET "/" for 127.0.0.1 at 2014-04-08 22:45:34 -0700
2006
+ Processing by HomeController#index as HTML
2007
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
2008
+ Rendered home/index.html.erb within layouts/application (1.5ms)
2009
+ Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.3ms)
2010
+ Started GET "/impersonate" for 127.0.0.1 at 2014-04-08 22:45:34 -0700
2011
+ Processing by UserImpersonate::ImpersonateController#index as HTML
2012
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
2013
+  (0.1ms) SELECT COUNT(*) FROM "users" WHERE ("users"."id" NOT IN (1))
2014
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE ("users"."id" NOT IN (1)) ORDER BY updated_at DESC
2015
+ Rendered /home/rcook/src/user_impersonate2/app/views/user_impersonate/impersonate/index.html.erb within layouts/user_impersonate/application (2.9ms)
2016
+ Completed 200 OK in 12ms (Views: 9.6ms | ActiveRecord: 0.4ms)
2017
+ Started GET "/impersonate/?utf8=%E2%9C%93&search=Normal+User" for 127.0.0.1 at 2014-04-08 22:45:34 -0700
2018
+ Processing by UserImpersonate::ImpersonateController#index as HTML
2019
+ Parameters: {"utf8"=>"✓", "search"=>"Normal User"}
2020
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
2021
+  (0.1ms) SELECT COUNT(*) FROM "users" WHERE ("users"."id" NOT IN (1)) AND (name like '%Normal User%')
2022
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE ("users"."id" NOT IN (1)) AND (name like '%Normal User%') ORDER BY updated_at DESC
2023
+ Rendered /home/rcook/src/user_impersonate2/app/views/user_impersonate/impersonate/index.html.erb within layouts/user_impersonate/application (1.6ms)
2024
+ Completed 200 OK in 4ms (Views: 2.1ms | ActiveRecord: 0.4ms)
2025
+ Started GET "/impersonate/user/2" for 127.0.0.1 at 2014-04-08 22:45:34 -0700
2026
+ Processing by UserImpersonate::ImpersonateController#create as HTML
2027
+ Parameters: {"user_id"=>"2"}
2028
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
2029
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "2"]]
2030
+ SQL (0.3ms) UPDATE "users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 2 [["last_sign_in_at", Wed, 09 Apr 2014 05:45:34 UTC +00:00], ["current_sign_in_at", Wed, 09 Apr 2014 05:45:34 UTC +00:00], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", Wed, 09 Apr 2014 05:45:34 UTC +00:00]]
2031
+ Redirected to http://www.example.com/
2032
+ Completed 302 Found in 4ms (ActiveRecord: 0.6ms)
2033
+ Started GET "/" for 127.0.0.1 at 2014-04-08 22:45:34 -0700
2034
+ Processing by HomeController#index as HTML
2035
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
2036
+ Rendered home/index.html.erb within layouts/application (0.9ms)
2037
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
2038
+ Rendered user_impersonate/_header.html.erb (1.4ms)
2039
+ Completed 200 OK in 4ms (Views: 3.7ms | ActiveRecord: 0.2ms)
2040
+ Started DELETE "/impersonate/revert" for 127.0.0.1 at 2014-04-08 22:45:34 -0700
2041
+ Processing by UserImpersonate::ImpersonateController#destroy as HTML
2042
+ Parameters: {"utf8"=>"✓"}
2043
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
2044
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
2045
+ SQL (0.2ms) UPDATE "users" SET "current_sign_in_at" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 1 [["current_sign_in_at", Wed, 09 Apr 2014 05:45:34 UTC +00:00], ["sign_in_count", 2], ["updated_at", Wed, 09 Apr 2014 05:45:34 UTC +00:00]]
2046
+ Redirected to http://www.example.com/
2047
+ Completed 302 Found in 3ms (ActiveRecord: 0.4ms)
2048
+ Started GET "/" for 127.0.0.1 at 2014-04-08 22:45:34 -0700
2049
+ Processing by HomeController#index as HTML
2050
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
2051
+ Rendered home/index.html.erb within layouts/application (1.0ms)
2052
+ Completed 200 OK in 2ms (Views: 1.6ms | ActiveRecord: 0.1ms)
2053
+  (0.4ms) rollback transaction