(4.1ms) SELECT sqlite_version(*)  (2.8ms) SELECT sqlite_version(*)  (0.1ms) SELECT sqlite_version(*)  (0.1ms) SELECT sqlite_version(*)  (0.8ms) DROP TABLE IF EXISTS "feature_toggles"  (5.2ms) CREATE TABLE "feature_toggles" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "key" varchar, "active" boolean, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)  (1.3ms) DROP TABLE IF EXISTS "users"  (3.5ms) CREATE TABLE "users" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar DEFAULT '' NOT NULL, "encrypted_password" varchar DEFAULT '' NOT NULL, "reset_password_token" varchar, "reset_password_sent_at" datetime, "remember_created_at" datetime, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)  (3.4ms) CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")  (5.0ms) CREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")  (5.5ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)  (0.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (7.3ms) INSERT INTO "schema_migrations" (version) VALUES (20200624115316)  (4.3ms) INSERT INTO "schema_migrations" (version) VALUES (20200623125321);   (3.6ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL) ActiveRecord::InternalMetadata Load (0.5ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]  (0.0ms) begin transaction ActiveRecord::InternalMetadata Create (4.7ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "test"], ["created_at", "2021-08-06 12:51:19.473267"], ["updated_at", "2021-08-06 12:51:19.473267"]]  (2.2ms) commit transaction ActiveRecord::InternalMetadata Load (0.4ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]] ActiveRecord::InternalMetadata Load (0.4ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "schema_sha1"], ["LIMIT", 1]]  (0.0ms) begin transaction ActiveRecord::InternalMetadata Create (1.6ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "schema_sha1"], ["value", "8dfe9119086661dc796fa00452dc81ff692523f5"], ["created_at", "2021-08-06 12:51:19.484405"], ["updated_at", "2021-08-06 12:51:19.484405"]]  (1.7ms) commit transaction  (0.1ms) SELECT sqlite_version(*)  (0.9ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (0.1ms) PRAGMA foreign_keys  (0.2ms) PRAGMA defer_foreign_keys  (0.1ms) PRAGMA defer_foreign_keys = ON  (0.1ms) PRAGMA foreign_keys = OFF  (0.2ms) TRUNCATE TABLE "feature_toggles"  (4.2ms) DELETE FROM "feature_toggles"  (0.8ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.8ms) DELETE FROM sqlite_sequence where name = 'feature_toggles';  (0.1ms) TRUNCATE TABLE "users"  (3.8ms) DELETE FROM "users"  (1.0ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.7ms) DELETE FROM sqlite_sequence where name = 'users';  (0.1ms) PRAGMA defer_foreign_keys = 0  (0.0ms) PRAGMA foreign_keys = 1  (0.1ms) begin transaction  (0.2ms) SAVEPOINT active_record_1 Started POST "/feature-toggles" for 127.0.0.1 at 2021-08-06 13:51:20 +0100 Processing by DefraRubyFeatures::FeatureTogglesController#create as HTML Completed 401 Unauthorized in 20ms (ActiveRecord: 0.0ms | Allocations: 1299)  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_2 User Exists? (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."email" = ? LIMIT ? [["email", "user1@example.com"], ["LIMIT", 1]] User Create (3.7ms) INSERT INTO "users" ("email", "encrypted_password", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["email", "user1@example.com"], ["encrypted_password", "$2a$04$iUS5.qGdog4sXCgsYakmOei.FTHwOT7IkxG4yQHodGAGOW77izwMO"], ["created_at", "2021-08-06 12:51:20.976768"], ["updated_at", "2021-08-06 12:51:20.976768"]]  (0.1ms) RELEASE SAVEPOINT active_record_2  (0.1ms) SELECT COUNT(*) FROM "feature_toggles" Started POST "/feature-toggles" for 127.0.0.1 at 2021-08-06 13:51:20 +0100 Processing by DefraRubyFeatures::FeatureTogglesController#create as HTML Parameters: {"feature_toggle"=>{"key"=>"test", "active"=>"1"}}  (0.1ms) SAVEPOINT active_record_2 FeatureToggle Create (0.6ms) INSERT INTO "feature_toggles" ("key", "active", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "test"], ["active", 1], ["created_at", "2021-08-06 12:51:21.038144"], ["updated_at", "2021-08-06 12:51:21.038144"]]  (0.1ms) RELEASE SAVEPOINT active_record_2 Redirected to http://www.example.com/feature-toggles Completed 302 Found in 16ms (ActiveRecord: 1.0ms | Allocations: 3345) FeatureToggle Load (0.1ms) SELECT "feature_toggles".* FROM "feature_toggles" ORDER BY "feature_toggles"."id" DESC LIMIT ? [["LIMIT", 1]]  (0.1ms) SELECT COUNT(*) FROM "feature_toggles"  (2.4ms) ROLLBACK TO SAVEPOINT active_record_1  (3.5ms) rollback transaction  (0.1ms) begin transaction  (0.2ms) SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_2 User Exists? (1.3ms) SELECT 1 AS one FROM "users" WHERE "users"."email" = ? LIMIT ? [["email", "user2@example.com"], ["LIMIT", 1]] User Create (3.2ms) INSERT INTO "users" ("email", "encrypted_password", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["email", "user2@example.com"], ["encrypted_password", "$2a$04$jsi1p0/0Ar0y7fGP1/zHyeZPObwDM2dqc3gU.L7hC4nRz8LCMNrmG"], ["created_at", "2021-08-06 12:51:21.088987"], ["updated_at", "2021-08-06 12:51:21.088987"]]  (0.1ms) RELEASE SAVEPOINT active_record_2  (0.1ms) SAVEPOINT active_record_2 FeatureToggle Create (0.4ms) INSERT INTO "feature_toggles" ("key", "active", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "a_feature_toggle"], ["active", 0], ["created_at", "2021-08-06 12:51:21.094840"], ["updated_at", "2021-08-06 12:51:21.094840"]]  (0.1ms) RELEASE SAVEPOINT active_record_2 Started GET "/feature-toggles" for 127.0.0.1 at 2021-08-06 13:51:21 +0100 Processing by DefraRubyFeatures::FeatureTogglesController#index as HTML Rendering /vagrant/defra-ruby-features/app/views/defra_ruby_features/feature_toggles/index.html.erb within layouts/application FeatureToggle Load (0.2ms) SELECT "feature_toggles".* FROM "feature_toggles" ORDER BY "feature_toggles"."key" ASC Rendered /vagrant/defra-ruby-features/app/views/defra_ruby_features/feature_toggles/index.html.erb within layouts/application (Duration: 34.8ms | Allocations: 2970) Completed 200 OK in 83ms (Views: 54.0ms | ActiveRecord: 0.2ms | Allocations: 5489)  (1.2ms) ROLLBACK TO SAVEPOINT active_record_1  (3.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Started GET "/feature-toggles" for 127.0.0.1 at 2021-08-06 13:51:21 +0100 Processing by DefraRubyFeatures::FeatureTogglesController#index as HTML Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 142)  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Started GET "/feature-toggles/new" for 127.0.0.1 at 2021-08-06 13:51:21 +0100 Processing by DefraRubyFeatures::FeatureTogglesController#new as HTML Completed 401 Unauthorized in 2ms (ActiveRecord: 0.0ms | Allocations: 142)  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_2 User Exists? (3.3ms) SELECT 1 AS one FROM "users" WHERE "users"."email" = ? LIMIT ? [["email", "user3@example.com"], ["LIMIT", 1]] User Create (5.9ms) INSERT INTO "users" ("email", "encrypted_password", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["email", "user3@example.com"], ["encrypted_password", "$2a$04$nHdYInVG3xbiDtw4Jw.bLe4P0uZkJZe3uNxRisaeyOPph6PzFPzmq"], ["created_at", "2021-08-06 12:51:21.358235"], ["updated_at", "2021-08-06 12:51:21.358235"]]  (0.3ms) RELEASE SAVEPOINT active_record_2 Started GET "/feature-toggles/new" for 127.0.0.1 at 2021-08-06 13:51:21 +0100 Processing by DefraRubyFeatures::FeatureTogglesController#new as HTML Rendering /vagrant/defra-ruby-features/app/views/defra_ruby_features/feature_toggles/new.html.erb within layouts/application Rendered /vagrant/defra-ruby-features/app/views/shared/_back.html.erb (Duration: 2.4ms | Allocations: 155) Rendered /vagrant/defra-ruby-features/app/views/defra_ruby_features/feature_toggles/new.html.erb within layouts/application (Duration: 36.3ms | Allocations: 1838) Completed 200 OK in 42ms (Views: 37.3ms | ActiveRecord: 0.0ms | Allocations: 2492)  (1.8ms) ROLLBACK TO SAVEPOINT active_record_1  (3.2ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_2 User Exists? (2.4ms) SELECT 1 AS one FROM "users" WHERE "users"."email" = ? LIMIT ? [["email", "user4@example.com"], ["LIMIT", 1]] User Create (5.1ms) INSERT INTO "users" ("email", "encrypted_password", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["email", "user4@example.com"], ["encrypted_password", "$2a$04$UMVahNCaBWKqX6A4gjPIT.7DooXuOcbGucB7VJuXbMKmW/GWLaGDa"], ["created_at", "2021-08-06 12:51:21.476921"], ["updated_at", "2021-08-06 12:51:21.476921"]]  (0.1ms) RELEASE SAVEPOINT active_record_2  (0.1ms) SAVEPOINT active_record_2 FeatureToggle Create (0.6ms) INSERT INTO "feature_toggles" ("key", "active", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "test-feature"], ["active", 0], ["created_at", "2021-08-06 12:51:21.484143"], ["updated_at", "2021-08-06 12:51:21.484143"]]  (0.1ms) RELEASE SAVEPOINT active_record_2 Started PUT "/feature-toggles/1" for 127.0.0.1 at 2021-08-06 13:51:21 +0100 Processing by DefraRubyFeatures::FeatureTogglesController#update as HTML Parameters: {"feature_toggle"=>{"active"=>"1"}, "id"=>"1"} FeatureToggle Load (0.2ms) SELECT "feature_toggles".* FROM "feature_toggles" WHERE "feature_toggles"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]  (0.1ms) SAVEPOINT active_record_2 FeatureToggle Update (0.2ms) UPDATE "feature_toggles" SET "active" = ?, "updated_at" = ? WHERE "feature_toggles"."id" = ? [["active", 1], ["updated_at", "2021-08-06 12:51:21.527368"], ["id", 1]]  (0.1ms) RELEASE SAVEPOINT active_record_2 Redirected to http://www.example.com/feature-toggles Completed 302 Found in 5ms (ActiveRecord: 0.5ms | Allocations: 954) FeatureToggle Load (0.1ms) SELECT "feature_toggles".* FROM "feature_toggles" WHERE "feature_toggles"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]  (2.1ms) ROLLBACK TO SAVEPOINT active_record_1  (5.2ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_2 FeatureToggle Create (6.6ms) INSERT INTO "feature_toggles" ("key", "active", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "test-feature"], ["active", 0], ["created_at", "2021-08-06 12:51:21.543758"], ["updated_at", "2021-08-06 12:51:21.543758"]]  (0.2ms) RELEASE SAVEPOINT active_record_2 Started PUT "/feature-toggles/1" for 127.0.0.1 at 2021-08-06 13:51:21 +0100 Processing by DefraRubyFeatures::FeatureTogglesController#update as HTML Parameters: {"id"=>"1"} Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 142)  (1.2ms) ROLLBACK TO SAVEPOINT active_record_1  (4.0ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_2 FeatureToggle Create (4.9ms) INSERT INTO "feature_toggles" ("key", "active", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "test-feature"], ["active", 0], ["created_at", "2021-08-06 12:51:21.608479"], ["updated_at", "2021-08-06 12:51:21.608479"]]  (0.1ms) RELEASE SAVEPOINT active_record_2  (0.2ms) SAVEPOINT active_record_2 User Exists? (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."email" = ? LIMIT ? [["email", "user5@example.com"], ["LIMIT", 1]] User Create (1.9ms) INSERT INTO "users" ("email", "encrypted_password", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["email", "user5@example.com"], ["encrypted_password", "$2a$04$VdY5k.4NFNeiRIbPU8g9AuIqdowe1uhKR3iJpD5dfAoe6d3iDAcKS"], ["created_at", "2021-08-06 12:51:21.619986"], ["updated_at", "2021-08-06 12:51:21.619986"]]  (0.2ms) RELEASE SAVEPOINT active_record_2  (0.2ms) SELECT COUNT(*) FROM "feature_toggles" Started DELETE "/feature-toggles/1" for 127.0.0.1 at 2021-08-06 13:51:21 +0100 Processing by DefraRubyFeatures::FeatureTogglesController#destroy as HTML Parameters: {"id"=>"1"} FeatureToggle Load (0.1ms) SELECT "feature_toggles".* FROM "feature_toggles" WHERE "feature_toggles"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]  (0.1ms) SAVEPOINT active_record_2 FeatureToggle Destroy (0.1ms) DELETE FROM "feature_toggles" WHERE "feature_toggles"."id" = ? [["id", 1]]  (0.1ms) RELEASE SAVEPOINT active_record_2 Redirected to http://www.example.com/feature-toggles Completed 302 Found in 3ms (ActiveRecord: 0.4ms | Allocations: 538)  (0.1ms) SELECT COUNT(*) FROM "feature_toggles"  (2.4ms) ROLLBACK TO SAVEPOINT active_record_1  (5.0ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_2 FeatureToggle Create (7.4ms) INSERT INTO "feature_toggles" ("key", "active", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "test-feature"], ["active", 0], ["created_at", "2021-08-06 12:51:21.703601"], ["updated_at", "2021-08-06 12:51:21.703601"]]  (0.1ms) RELEASE SAVEPOINT active_record_2 Started DELETE "/feature-toggles/1" for 127.0.0.1 at 2021-08-06 13:51:21 +0100 Processing by DefraRubyFeatures::FeatureTogglesController#destroy as HTML Parameters: {"id"=>"1"} Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms | Allocations: 142)  (0.9ms) ROLLBACK TO SAVEPOINT active_record_1  (3.5ms) rollback transaction  (0.1ms) begin transaction  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction