simple_crud 0.0.2 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/MIT-LICENSE +1 -1
- data/lib/simple_crud/version.rb +1 -1
- data/lib/simple_crud.rb +1 -1
- data/test/dummy/app/assets/javascripts/users.js +2 -0
- data/test/dummy/app/assets/stylesheets/users.css +4 -0
- data/test/dummy/app/controllers/application_controller.rb +3 -0
- data/test/dummy/app/controllers/users_controller.rb +37 -0
- data/test/dummy/app/helpers/users_helper.rb +2 -0
- data/test/dummy/app/models/user.rb +2 -0
- data/test/dummy/app/views/users/edit.html.erb +2 -0
- data/test/dummy/app/views/users/index.html.erb +2 -0
- data/test/dummy/app/views/users/new.html.erb +2 -0
- data/test/dummy/app/views/users/show.html.erb +0 -0
- data/test/dummy/config/routes.rb +3 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/migrate/20150211054043_create_users.rb +8 -0
- data/test/dummy/db/schema.rb +22 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +10 -0
- data/test/dummy/log/test.log +533 -0
- data/test/dummy/test/controllers/users_controller_test.rb +47 -0
- data/test/dummy/test/fixtures/users.yml +8 -0
- data/test/dummy/test/models/user_test.rb +7 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/4050a4e5062ab95c9f32e9b6940821ea +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/5f1a0d05e77ca8b9a1fc2a47e17a8174 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/87b209c0c9da28094a8d5581a21262c6 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/f56253b5f374fff1a33fbbc9881c9124 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
- metadata +54 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c380ef218249514178c3d16b277362a91c8487e7
|
|
4
|
+
data.tar.gz: 7947c38e93dac7d0688ea0c477b73765ef4ea55f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2e38d07c3e544f9b8361250a1ed735b693a941b8dbc61339ca60d53a370b9cabb9c80faf6f8063e3ae839fbb2bd2e5bfa811665ac93421598fe2666901425f8e
|
|
7
|
+
data.tar.gz: 1220f1fff9adc0e5739bae6df309519a836348c9ad1f48e9c6a9446fcd9b6953bb165013c82e07d48efab3e04b93e3b658045b202e61fad7cfb770b5749b2169
|
data/MIT-LICENSE
CHANGED
data/lib/simple_crud/version.rb
CHANGED
data/lib/simple_crud.rb
CHANGED
|
@@ -5,7 +5,7 @@ module SimpleCrud
|
|
|
5
5
|
end
|
|
6
6
|
|
|
7
7
|
def create_(instance, path, r) # Save the instance, Redirect_to if save successful, #render template if not successful
|
|
8
|
-
if instance.
|
|
8
|
+
if instance.create
|
|
9
9
|
redirect_to path, notice: class_name(instance) + " created."
|
|
10
10
|
else
|
|
11
11
|
render r
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
class UsersController < ApplicationController
|
|
2
|
+
|
|
3
|
+
before_action :find_user, only: [:show, :edit, :update, :destroy]
|
|
4
|
+
|
|
5
|
+
def index
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
def new
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def create
|
|
12
|
+
@user = User.new(user_params)
|
|
13
|
+
create_ @user, users_path, :new
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def edit
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def update
|
|
20
|
+
update_ @user, user_params, users_path
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def destroy
|
|
24
|
+
destroy_ @user, users_path
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
private
|
|
28
|
+
|
|
29
|
+
def find_user
|
|
30
|
+
@user = User.find params[:id]
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def user_params
|
|
34
|
+
params.require(:user).permit(:name)
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
end
|
|
File without changes
|
data/test/dummy/config/routes.rb
CHANGED
|
Binary file
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# encoding: UTF-8
|
|
2
|
+
# This file is auto-generated from the current state of the database. Instead
|
|
3
|
+
# of editing this file, please use the migrations feature of Active Record to
|
|
4
|
+
# incrementally modify your database, and then regenerate this schema definition.
|
|
5
|
+
#
|
|
6
|
+
# Note that this schema.rb definition is the authoritative source for your
|
|
7
|
+
# database schema. If you need to create the application database on another
|
|
8
|
+
# system, you should be using db:schema:load, not running all the migrations
|
|
9
|
+
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
|
10
|
+
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
|
11
|
+
#
|
|
12
|
+
# It's strongly recommended that you check this file into your version control system.
|
|
13
|
+
|
|
14
|
+
ActiveRecord::Schema.define(version: 20150211054043) do
|
|
15
|
+
|
|
16
|
+
create_table "users", force: :cascade do |t|
|
|
17
|
+
t.string "name"
|
|
18
|
+
t.datetime "created_at", null: false
|
|
19
|
+
t.datetime "updated_at", null: false
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
end
|
data/test/dummy/db/test.sqlite3
CHANGED
|
Binary file
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
[1m[36m (1.3ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m
|
|
2
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
|
3
|
+
[1m[36m (1.2ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
|
4
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.2ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
|
5
|
+
Migrating to CreateUsers (20150211054043)
|
|
6
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
|
7
|
+
[1m[35m (0.5ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
|
8
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20150211054043"]]
|
|
9
|
+
[1m[35m (1.3ms)[0m commit transaction
|
|
10
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
data/test/dummy/log/test.log
CHANGED
|
@@ -8,3 +8,536 @@ SimpleCrudTest: test_truth
|
|
|
8
8
|
SimpleCrudTest: test_truth
|
|
9
9
|
--------------------------
|
|
10
10
|
[1m[35m (0.1ms)[0m rollback transaction
|
|
11
|
+
[1m[36m (1.2ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
|
12
|
+
[1m[35m (1.1ms)[0m CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)
|
|
13
|
+
[1m[36m (0.1ms)[0m [1mselect sqlite_version(*)[0m
|
|
14
|
+
[1m[35m (1.0ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
|
15
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
|
16
|
+
[1m[35m (0.9ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150211054043')
|
|
17
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
|
18
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
|
19
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
20
|
+
--------------------------
|
|
21
|
+
SimpleCrudTest: test_truth
|
|
22
|
+
--------------------------
|
|
23
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
|
24
|
+
[1m[35m (0.0ms)[0m begin transaction
|
|
25
|
+
----------------------------------------
|
|
26
|
+
UsersControllerTest: test_should_get_new
|
|
27
|
+
----------------------------------------
|
|
28
|
+
Processing by UsersController#new as HTML
|
|
29
|
+
Rendered users/new.html.erb within layouts/application (2.2ms)
|
|
30
|
+
Completed 200 OK in 37ms (Views: 36.6ms | ActiveRecord: 0.0ms)
|
|
31
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
|
32
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
33
|
+
-----------------------------------------
|
|
34
|
+
UsersControllerTest: test_should_get_edit
|
|
35
|
+
-----------------------------------------
|
|
36
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
|
37
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
38
|
+
--------------------------------------------
|
|
39
|
+
UsersControllerTest: test_should_create_user
|
|
40
|
+
--------------------------------------------
|
|
41
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "users"[0m
|
|
42
|
+
Processing by UsersController#create as HTML
|
|
43
|
+
Parameters: {"user"=>{"name"=>"Joe Smith"}}
|
|
44
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
45
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("name", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["name", "Joe Smith"], ["created_at", "2015-02-11 06:09:42.880781"], ["updated_at", "2015-02-11 06:09:42.880781"]]
|
|
46
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
47
|
+
Redirected to http://test.host/users
|
|
48
|
+
Completed 302 Found in 13ms (ActiveRecord: 0.7ms)
|
|
49
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "users"[0m
|
|
50
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
|
51
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
|
52
|
+
------------------------------------------
|
|
53
|
+
UsersControllerTest: test_should_get_index
|
|
54
|
+
------------------------------------------
|
|
55
|
+
Processing by UsersController#index as HTML
|
|
56
|
+
Rendered users/index.html.erb within layouts/application (0.4ms)
|
|
57
|
+
Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.0ms)
|
|
58
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
|
59
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
|
60
|
+
-----------------------------------------
|
|
61
|
+
UsersControllerTest: test_should_get_show
|
|
62
|
+
-----------------------------------------
|
|
63
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
|
64
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
|
65
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
|
66
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
67
|
+
--------------------------
|
|
68
|
+
SimpleCrudTest: test_truth
|
|
69
|
+
--------------------------
|
|
70
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
|
71
|
+
[1m[35m (0.0ms)[0m begin transaction
|
|
72
|
+
-----------------------------------------
|
|
73
|
+
UsersControllerTest: test_should_get_edit
|
|
74
|
+
-----------------------------------------
|
|
75
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
|
76
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
77
|
+
---------------------------------------------
|
|
78
|
+
UsersControllerTest: test_should_destroy_post
|
|
79
|
+
---------------------------------------------
|
|
80
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
|
81
|
+
[1m[35m (0.0ms)[0m begin transaction
|
|
82
|
+
--------------------------------------------
|
|
83
|
+
UsersControllerTest: test_should_update_user
|
|
84
|
+
--------------------------------------------
|
|
85
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
|
86
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
87
|
+
-----------------------------------------
|
|
88
|
+
UsersControllerTest: test_should_get_show
|
|
89
|
+
-----------------------------------------
|
|
90
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
|
91
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
92
|
+
------------------------------------------
|
|
93
|
+
UsersControllerTest: test_should_get_index
|
|
94
|
+
------------------------------------------
|
|
95
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
|
96
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
97
|
+
--------------------------------------------
|
|
98
|
+
UsersControllerTest: test_should_create_user
|
|
99
|
+
--------------------------------------------
|
|
100
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
|
101
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
102
|
+
----------------------------------------
|
|
103
|
+
UsersControllerTest: test_should_get_new
|
|
104
|
+
----------------------------------------
|
|
105
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
|
106
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
|
107
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
108
|
+
--------------------------------------------
|
|
109
|
+
UsersControllerTest: test_should_update_user
|
|
110
|
+
--------------------------------------------
|
|
111
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
|
112
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
113
|
+
---------------------------------------------
|
|
114
|
+
UsersControllerTest: test_should_destroy_post
|
|
115
|
+
---------------------------------------------
|
|
116
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
|
117
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
118
|
+
------------------------------------------
|
|
119
|
+
UsersControllerTest: test_should_get_index
|
|
120
|
+
------------------------------------------
|
|
121
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
|
122
|
+
[1m[35m (0.0ms)[0m begin transaction
|
|
123
|
+
-----------------------------------------
|
|
124
|
+
UsersControllerTest: test_should_get_edit
|
|
125
|
+
-----------------------------------------
|
|
126
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
|
127
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
128
|
+
-----------------------------------------
|
|
129
|
+
UsersControllerTest: test_should_get_show
|
|
130
|
+
-----------------------------------------
|
|
131
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
|
132
|
+
[1m[35m (7.2ms)[0m begin transaction
|
|
133
|
+
--------------------------------------------
|
|
134
|
+
UsersControllerTest: test_should_create_user
|
|
135
|
+
--------------------------------------------
|
|
136
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
|
137
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
138
|
+
----------------------------------------
|
|
139
|
+
UsersControllerTest: test_should_get_new
|
|
140
|
+
----------------------------------------
|
|
141
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
|
142
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
143
|
+
--------------------------
|
|
144
|
+
SimpleCrudTest: test_truth
|
|
145
|
+
--------------------------
|
|
146
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
|
147
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
|
148
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
149
|
+
--------------------------
|
|
150
|
+
SimpleCrudTest: test_truth
|
|
151
|
+
--------------------------
|
|
152
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
|
153
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
154
|
+
---------------------------------------------
|
|
155
|
+
UsersControllerTest: test_should_destroy_post
|
|
156
|
+
---------------------------------------------
|
|
157
|
+
[1m[36m (0.2ms)[0m [1mrollback transaction[0m
|
|
158
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
159
|
+
-----------------------------------------
|
|
160
|
+
UsersControllerTest: test_should_get_show
|
|
161
|
+
-----------------------------------------
|
|
162
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
|
163
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
164
|
+
-----------------------------------------
|
|
165
|
+
UsersControllerTest: test_should_get_edit
|
|
166
|
+
-----------------------------------------
|
|
167
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
|
168
|
+
[1m[35m (0.0ms)[0m begin transaction
|
|
169
|
+
--------------------------------------------
|
|
170
|
+
UsersControllerTest: test_should_create_user
|
|
171
|
+
--------------------------------------------
|
|
172
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
|
173
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
174
|
+
--------------------------------------------
|
|
175
|
+
UsersControllerTest: test_should_update_user
|
|
176
|
+
--------------------------------------------
|
|
177
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
|
178
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
179
|
+
----------------------------------------
|
|
180
|
+
UsersControllerTest: test_should_get_new
|
|
181
|
+
----------------------------------------
|
|
182
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
|
183
|
+
[1m[35m (0.0ms)[0m begin transaction
|
|
184
|
+
------------------------------------------
|
|
185
|
+
UsersControllerTest: test_should_get_index
|
|
186
|
+
------------------------------------------
|
|
187
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
|
188
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
|
189
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
190
|
+
--------------------------------------------
|
|
191
|
+
UsersControllerTest: test_should_create_user
|
|
192
|
+
--------------------------------------------
|
|
193
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
|
194
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
195
|
+
-----------------------------------------
|
|
196
|
+
UsersControllerTest: test_should_get_show
|
|
197
|
+
-----------------------------------------
|
|
198
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
|
199
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
200
|
+
---------------------------------------------
|
|
201
|
+
UsersControllerTest: test_should_destroy_post
|
|
202
|
+
---------------------------------------------
|
|
203
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
|
204
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
205
|
+
------------------------------------------
|
|
206
|
+
UsersControllerTest: test_should_get_index
|
|
207
|
+
------------------------------------------
|
|
208
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
|
209
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
210
|
+
-----------------------------------------
|
|
211
|
+
UsersControllerTest: test_should_get_edit
|
|
212
|
+
-----------------------------------------
|
|
213
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
|
214
|
+
[1m[35m (0.2ms)[0m begin transaction
|
|
215
|
+
----------------------------------------
|
|
216
|
+
UsersControllerTest: test_should_get_new
|
|
217
|
+
----------------------------------------
|
|
218
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
|
219
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
220
|
+
--------------------------------------------
|
|
221
|
+
UsersControllerTest: test_should_update_user
|
|
222
|
+
--------------------------------------------
|
|
223
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
|
224
|
+
[1m[35m (0.0ms)[0m begin transaction
|
|
225
|
+
--------------------------
|
|
226
|
+
SimpleCrudTest: test_truth
|
|
227
|
+
--------------------------
|
|
228
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
|
229
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
|
230
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
231
|
+
-----------------------------------------
|
|
232
|
+
UsersControllerTest: test_should_get_show
|
|
233
|
+
-----------------------------------------
|
|
234
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
|
235
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
236
|
+
---------------------------------------------
|
|
237
|
+
UsersControllerTest: test_should_destroy_post
|
|
238
|
+
---------------------------------------------
|
|
239
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
240
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Joe Smith"], ["created_at", "2015-02-11 06:31:25.077078"], ["updated_at", "2015-02-11 06:31:25.077078"]]
|
|
241
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
242
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "users"
|
|
243
|
+
Processing by UsersController#destroy as HTML
|
|
244
|
+
Parameters: {"id"=>true}
|
|
245
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
|
246
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
|
247
|
+
[1m[36mSQL (1.1ms)[0m [1mDELETE FROM "users" WHERE "users"."id" = ?[0m [["id", 1]]
|
|
248
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
249
|
+
Redirected to http://test.host/users
|
|
250
|
+
Completed 302 Found in 14ms (ActiveRecord: 1.4ms)
|
|
251
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "users"[0m
|
|
252
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
|
253
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
|
254
|
+
--------------------------------------------
|
|
255
|
+
UsersControllerTest: test_should_create_user
|
|
256
|
+
--------------------------------------------
|
|
257
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "users"
|
|
258
|
+
Processing by UsersController#create as HTML
|
|
259
|
+
Parameters: {"user"=>{"name"=>"Joe Smith"}}
|
|
260
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
261
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Joe Smith"], ["created_at", "2015-02-11 06:31:25.105042"], ["updated_at", "2015-02-11 06:31:25.105042"]]
|
|
262
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
263
|
+
Redirected to http://test.host/users
|
|
264
|
+
Completed 302 Found in 2ms (ActiveRecord: 0.3ms)
|
|
265
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "users"
|
|
266
|
+
[1m[36m (0.5ms)[0m [1mrollback transaction[0m
|
|
267
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
268
|
+
-----------------------------------------
|
|
269
|
+
UsersControllerTest: test_should_get_edit
|
|
270
|
+
-----------------------------------------
|
|
271
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
|
272
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
273
|
+
----------------------------------------
|
|
274
|
+
UsersControllerTest: test_should_get_new
|
|
275
|
+
----------------------------------------
|
|
276
|
+
Processing by UsersController#new as HTML
|
|
277
|
+
Rendered users/new.html.erb within layouts/application (2.2ms)
|
|
278
|
+
Completed 200 OK in 31ms (Views: 30.3ms | ActiveRecord: 0.0ms)
|
|
279
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
|
280
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
281
|
+
------------------------------------------
|
|
282
|
+
UsersControllerTest: test_should_get_index
|
|
283
|
+
------------------------------------------
|
|
284
|
+
Processing by UsersController#index as HTML
|
|
285
|
+
Rendered users/index.html.erb within layouts/application (0.5ms)
|
|
286
|
+
Completed 200 OK in 2ms (Views: 2.3ms | ActiveRecord: 0.0ms)
|
|
287
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
|
288
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
289
|
+
--------------------------------------------
|
|
290
|
+
UsersControllerTest: test_should_update_user
|
|
291
|
+
--------------------------------------------
|
|
292
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
293
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Joe Smith"], ["created_at", "2015-02-11 06:31:25.147623"], ["updated_at", "2015-02-11 06:31:25.147623"]]
|
|
294
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
295
|
+
Processing by UsersController#update as HTML
|
|
296
|
+
Parameters: {"user"=>{"name"=>"Smith Joe"}, "id"=>true}
|
|
297
|
+
[1m[35mUser Load (0.0ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
|
|
298
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
299
|
+
[1m[35mSQL (0.4ms)[0m UPDATE "users" SET "name" = ?, "updated_at" = ? WHERE "users"."id" = ? [["name", "Smith Joe"], ["updated_at", "2015-02-11 06:31:25.150986"], ["id", 1]]
|
|
300
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
301
|
+
Redirected to http://test.host/users
|
|
302
|
+
Completed 302 Found in 3ms (ActiveRecord: 0.5ms)
|
|
303
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
|
304
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
|
305
|
+
--------------------------
|
|
306
|
+
SimpleCrudTest: test_truth
|
|
307
|
+
--------------------------
|
|
308
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
|
309
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
|
310
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
311
|
+
--------------------------------------------
|
|
312
|
+
UsersControllerTest: test_should_create_user
|
|
313
|
+
--------------------------------------------
|
|
314
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "users"[0m
|
|
315
|
+
Processing by UsersController#create as HTML
|
|
316
|
+
Parameters: {"user"=>{"name"=>"Joe Smith"}}
|
|
317
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
318
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users" ("name", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["name", "Joe Smith"], ["created_at", "2015-02-11 06:32:24.417537"], ["updated_at", "2015-02-11 06:32:24.417537"]]
|
|
319
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
320
|
+
Redirected to http://test.host/users
|
|
321
|
+
Completed 302 Found in 11ms (ActiveRecord: 0.7ms)
|
|
322
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "users"[0m
|
|
323
|
+
[1m[35m (8.8ms)[0m rollback transaction
|
|
324
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
|
325
|
+
-----------------------------------------
|
|
326
|
+
UsersControllerTest: test_should_get_show
|
|
327
|
+
-----------------------------------------
|
|
328
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
|
329
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
|
330
|
+
-----------------------------------------
|
|
331
|
+
UsersControllerTest: test_should_get_edit
|
|
332
|
+
-----------------------------------------
|
|
333
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
|
334
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
|
335
|
+
----------------------------------------
|
|
336
|
+
UsersControllerTest: test_should_get_new
|
|
337
|
+
----------------------------------------
|
|
338
|
+
Processing by UsersController#new as HTML
|
|
339
|
+
Rendered users/new.html.erb within layouts/application (1.0ms)
|
|
340
|
+
Completed 200 OK in 16ms (Views: 15.7ms | ActiveRecord: 0.0ms)
|
|
341
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
|
342
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
|
343
|
+
------------------------------------------
|
|
344
|
+
UsersControllerTest: test_should_get_index
|
|
345
|
+
------------------------------------------
|
|
346
|
+
Processing by UsersController#index as HTML
|
|
347
|
+
Rendered users/index.html.erb within layouts/application (0.4ms)
|
|
348
|
+
Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.0ms)
|
|
349
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
|
350
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
|
351
|
+
--------------------------------------------
|
|
352
|
+
UsersControllerTest: test_should_update_user
|
|
353
|
+
--------------------------------------------
|
|
354
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
|
355
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["name", "Joe Smith"], ["created_at", "2015-02-11 06:32:24.457816"], ["updated_at", "2015-02-11 06:32:24.457816"]]
|
|
356
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
|
357
|
+
Processing by UsersController#update as HTML
|
|
358
|
+
Parameters: {"user"=>{"name"=>"Smith Joe"}, "id"=>true}
|
|
359
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
|
360
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
|
361
|
+
[1m[36mSQL (1.1ms)[0m [1mUPDATE "users" SET "name" = ?, "updated_at" = ? WHERE "users"."id" = ?[0m [["name", "Smith Joe"], ["updated_at", "2015-02-11 06:32:24.465123"], ["id", 1]]
|
|
362
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
363
|
+
Redirected to http://test.host/users
|
|
364
|
+
Completed 302 Found in 8ms (ActiveRecord: 1.4ms)
|
|
365
|
+
[1m[36m (0.8ms)[0m [1mrollback transaction[0m
|
|
366
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
367
|
+
---------------------------------------------
|
|
368
|
+
UsersControllerTest: test_should_destroy_post
|
|
369
|
+
---------------------------------------------
|
|
370
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
371
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Joe Smith"], ["created_at", "2015-02-11 06:32:24.470730"], ["updated_at", "2015-02-11 06:32:24.470730"]]
|
|
372
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
373
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "users"
|
|
374
|
+
Processing by UsersController#destroy as HTML
|
|
375
|
+
Parameters: {"id"=>true}
|
|
376
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
|
377
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
|
378
|
+
[1m[36mSQL (0.4ms)[0m [1mDELETE FROM "users" WHERE "users"."id" = ?[0m [["id", 1]]
|
|
379
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
380
|
+
Redirected to http://test.host/users
|
|
381
|
+
Completed 302 Found in 2ms (ActiveRecord: 0.6ms)
|
|
382
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "users"[0m
|
|
383
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
|
384
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
|
385
|
+
--------------------------
|
|
386
|
+
SimpleCrudTest: test_truth
|
|
387
|
+
--------------------------
|
|
388
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
|
389
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
|
390
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
391
|
+
--------------------------
|
|
392
|
+
SimpleCrudTest: test_truth
|
|
393
|
+
--------------------------
|
|
394
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
|
395
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
396
|
+
--------------------------------------------
|
|
397
|
+
UsersControllerTest: test_should_create_user
|
|
398
|
+
--------------------------------------------
|
|
399
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "users"[0m
|
|
400
|
+
Processing by UsersController#create as HTML
|
|
401
|
+
Parameters: {"user"=>{"name"=>"Joe Smith"}}
|
|
402
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
403
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("name", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["name", "Joe Smith"], ["created_at", "2015-02-11 06:44:52.310840"], ["updated_at", "2015-02-11 06:44:52.310840"]]
|
|
404
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
|
405
|
+
Redirected to http://test.host/users
|
|
406
|
+
Completed 302 Found in 11ms (ActiveRecord: 0.8ms)
|
|
407
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "users"[0m
|
|
408
|
+
[1m[35m (8.7ms)[0m rollback transaction
|
|
409
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
|
410
|
+
-----------------------------------------
|
|
411
|
+
UsersControllerTest: test_should_get_show
|
|
412
|
+
-----------------------------------------
|
|
413
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
|
414
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
|
415
|
+
----------------------------------------
|
|
416
|
+
UsersControllerTest: test_should_get_new
|
|
417
|
+
----------------------------------------
|
|
418
|
+
Processing by UsersController#new as HTML
|
|
419
|
+
Rendered users/new.html.erb within layouts/application (1.7ms)
|
|
420
|
+
Completed 200 OK in 21ms (Views: 21.0ms | ActiveRecord: 0.0ms)
|
|
421
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
|
422
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
|
423
|
+
--------------------------------------------
|
|
424
|
+
UsersControllerTest: test_should_update_user
|
|
425
|
+
--------------------------------------------
|
|
426
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
427
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("name", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["name", "Joe Smith"], ["created_at", "2015-02-11 06:44:52.351200"], ["updated_at", "2015-02-11 06:44:52.351200"]]
|
|
428
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
429
|
+
Processing by UsersController#update as HTML
|
|
430
|
+
Parameters: {"user"=>{"name"=>"Smith Joe"}, "id"=>true}
|
|
431
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
|
432
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
433
|
+
[1m[36mSQL (1.2ms)[0m [1mUPDATE "users" SET "name" = ?, "updated_at" = ? WHERE "users"."id" = ?[0m [["name", "Smith Joe"], ["updated_at", "2015-02-11 06:44:52.359373"], ["id", 1]]
|
|
434
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
435
|
+
Redirected to http://test.host/users
|
|
436
|
+
Completed 302 Found in 9ms (ActiveRecord: 1.5ms)
|
|
437
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
|
438
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
439
|
+
------------------------------------------
|
|
440
|
+
UsersControllerTest: test_should_get_index
|
|
441
|
+
------------------------------------------
|
|
442
|
+
Processing by UsersController#index as HTML
|
|
443
|
+
Rendered users/index.html.erb within layouts/application (0.4ms)
|
|
444
|
+
Completed 200 OK in 2ms (Views: 1.6ms | ActiveRecord: 0.0ms)
|
|
445
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
|
446
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
447
|
+
---------------------------------------------
|
|
448
|
+
UsersControllerTest: test_should_destroy_post
|
|
449
|
+
---------------------------------------------
|
|
450
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
451
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Joe Smith"], ["created_at", "2015-02-11 06:44:52.369138"], ["updated_at", "2015-02-11 06:44:52.369138"]]
|
|
452
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
453
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "users"
|
|
454
|
+
Processing by UsersController#destroy as HTML
|
|
455
|
+
Parameters: {"id"=>true}
|
|
456
|
+
[1m[36mUser Load (0.0ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
|
457
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
458
|
+
[1m[36mSQL (0.3ms)[0m [1mDELETE FROM "users" WHERE "users"."id" = ?[0m [["id", 1]]
|
|
459
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
460
|
+
Redirected to http://test.host/users
|
|
461
|
+
Completed 302 Found in 2ms (ActiveRecord: 0.5ms)
|
|
462
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "users"[0m
|
|
463
|
+
[1m[35m (0.6ms)[0m rollback transaction
|
|
464
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
|
465
|
+
-----------------------------------------
|
|
466
|
+
UsersControllerTest: test_should_get_edit
|
|
467
|
+
-----------------------------------------
|
|
468
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
|
469
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
|
470
|
+
[1m[35m (0.2ms)[0m begin transaction
|
|
471
|
+
--------------------------------------------
|
|
472
|
+
UsersControllerTest: test_should_update_user
|
|
473
|
+
--------------------------------------------
|
|
474
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
475
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Joe Smith"], ["created_at", "2015-02-11 06:46:58.745957"], ["updated_at", "2015-02-11 06:46:58.745957"]]
|
|
476
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
477
|
+
Processing by UsersController#update as HTML
|
|
478
|
+
Parameters: {"user"=>{"name"=>"Smith Joe"}, "id"=>true}
|
|
479
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
|
|
480
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
481
|
+
[1m[35mSQL (1.3ms)[0m UPDATE "users" SET "name" = ?, "updated_at" = ? WHERE "users"."id" = ? [["name", "Smith Joe"], ["updated_at", "2015-02-11 06:46:58.757047"], ["id", 1]]
|
|
482
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
483
|
+
Redirected to http://test.host/users
|
|
484
|
+
Completed 302 Found in 8ms (ActiveRecord: 1.6ms)
|
|
485
|
+
[1m[35m (8.9ms)[0m rollback transaction
|
|
486
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
|
487
|
+
---------------------------------------------
|
|
488
|
+
UsersControllerTest: test_should_destroy_post
|
|
489
|
+
---------------------------------------------
|
|
490
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
491
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("name", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["name", "Joe Smith"], ["created_at", "2015-02-11 06:46:58.771352"], ["updated_at", "2015-02-11 06:46:58.771352"]]
|
|
492
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
|
493
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "users"[0m
|
|
494
|
+
Processing by UsersController#destroy as HTML
|
|
495
|
+
Parameters: {"id"=>true}
|
|
496
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
|
|
497
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
498
|
+
[1m[35mSQL (0.4ms)[0m DELETE FROM "users" WHERE "users"."id" = ? [["id", 1]]
|
|
499
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
500
|
+
Redirected to http://test.host/users
|
|
501
|
+
Completed 302 Found in 2ms (ActiveRecord: 0.5ms)
|
|
502
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "users"
|
|
503
|
+
[1m[36m (0.8ms)[0m [1mrollback transaction[0m
|
|
504
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
505
|
+
------------------------------------------
|
|
506
|
+
UsersControllerTest: test_should_get_index
|
|
507
|
+
------------------------------------------
|
|
508
|
+
Processing by UsersController#index as HTML
|
|
509
|
+
Rendered users/index.html.erb within layouts/application (1.6ms)
|
|
510
|
+
Completed 200 OK in 19ms (Views: 19.3ms | ActiveRecord: 0.0ms)
|
|
511
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
|
512
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
513
|
+
-----------------------------------------
|
|
514
|
+
UsersControllerTest: test_should_get_edit
|
|
515
|
+
-----------------------------------------
|
|
516
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
|
517
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
518
|
+
--------------------------------------------
|
|
519
|
+
UsersControllerTest: test_should_create_user
|
|
520
|
+
--------------------------------------------
|
|
521
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "users"[0m
|
|
522
|
+
Processing by UsersController#create as HTML
|
|
523
|
+
Parameters: {"user"=>{"name"=>"Joe Smith"}}
|
|
524
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
|
525
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("name", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["name", "Joe Smith"], ["created_at", "2015-02-11 06:46:58.803970"], ["updated_at", "2015-02-11 06:46:58.803970"]]
|
|
526
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
527
|
+
Redirected to http://test.host/users
|
|
528
|
+
Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
|
|
529
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "users"[0m
|
|
530
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
|
531
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
|
532
|
+
----------------------------------------
|
|
533
|
+
UsersControllerTest: test_should_get_new
|
|
534
|
+
----------------------------------------
|
|
535
|
+
Processing by UsersController#new as HTML
|
|
536
|
+
Rendered users/new.html.erb within layouts/application (0.4ms)
|
|
537
|
+
Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.0ms)
|
|
538
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
|
539
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
|
540
|
+
--------------------------
|
|
541
|
+
SimpleCrudTest: test_truth
|
|
542
|
+
--------------------------
|
|
543
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
require 'test_helper'
|
|
2
|
+
|
|
3
|
+
class UsersControllerTest < ActionController::TestCase
|
|
4
|
+
# setup do
|
|
5
|
+
# @user = users(:one)
|
|
6
|
+
# end
|
|
7
|
+
|
|
8
|
+
test "should get index" do
|
|
9
|
+
get :index
|
|
10
|
+
assert_response :success
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
test "should get new" do
|
|
14
|
+
get :new
|
|
15
|
+
assert_response :success
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
test "should create user" do
|
|
19
|
+
assert_difference('User.count') do
|
|
20
|
+
post :create, user: {name: 'Joe Smith'}
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
assert_redirected_to users_path
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
test "should update user" do
|
|
27
|
+
user = User.new(name: "Joe Smith").save
|
|
28
|
+
patch :update, id: user, user: { name: "Smith Joe" }
|
|
29
|
+
assert_redirected_to users_paths
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
test "should get edit" do
|
|
33
|
+
get :edit
|
|
34
|
+
assert_response :success
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
test "should destroy post" do
|
|
38
|
+
user = User.new(name: "Joe Smith").save
|
|
39
|
+
|
|
40
|
+
assert_difference('User.count', -1) do
|
|
41
|
+
delete :destroy, id: user
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
assert_redirected_to users_path
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: simple_crud
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0
|
|
4
|
+
version: 0.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jordan-deJong
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-02-
|
|
11
|
+
date: 2015-02-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|
|
@@ -53,10 +53,19 @@ files:
|
|
|
53
53
|
- test/dummy/README.rdoc
|
|
54
54
|
- test/dummy/Rakefile
|
|
55
55
|
- test/dummy/app/assets/javascripts/application.js
|
|
56
|
+
- test/dummy/app/assets/javascripts/users.js
|
|
56
57
|
- test/dummy/app/assets/stylesheets/application.css
|
|
58
|
+
- test/dummy/app/assets/stylesheets/users.css
|
|
57
59
|
- test/dummy/app/controllers/application_controller.rb
|
|
60
|
+
- test/dummy/app/controllers/users_controller.rb
|
|
58
61
|
- test/dummy/app/helpers/application_helper.rb
|
|
62
|
+
- test/dummy/app/helpers/users_helper.rb
|
|
63
|
+
- test/dummy/app/models/user.rb
|
|
59
64
|
- test/dummy/app/views/layouts/application.html.erb
|
|
65
|
+
- test/dummy/app/views/users/edit.html.erb
|
|
66
|
+
- test/dummy/app/views/users/index.html.erb
|
|
67
|
+
- test/dummy/app/views/users/new.html.erb
|
|
68
|
+
- test/dummy/app/views/users/show.html.erb
|
|
60
69
|
- test/dummy/bin/bundle
|
|
61
70
|
- test/dummy/bin/rails
|
|
62
71
|
- test/dummy/bin/rake
|
|
@@ -80,12 +89,29 @@ files:
|
|
|
80
89
|
- test/dummy/config/locales/en.yml
|
|
81
90
|
- test/dummy/config/routes.rb
|
|
82
91
|
- test/dummy/config/secrets.yml
|
|
92
|
+
- test/dummy/db/development.sqlite3
|
|
93
|
+
- test/dummy/db/migrate/20150211054043_create_users.rb
|
|
94
|
+
- test/dummy/db/schema.rb
|
|
83
95
|
- test/dummy/db/test.sqlite3
|
|
96
|
+
- test/dummy/log/development.log
|
|
84
97
|
- test/dummy/log/test.log
|
|
85
98
|
- test/dummy/public/404.html
|
|
86
99
|
- test/dummy/public/422.html
|
|
87
100
|
- test/dummy/public/500.html
|
|
88
101
|
- test/dummy/public/favicon.ico
|
|
102
|
+
- test/dummy/test/controllers/users_controller_test.rb
|
|
103
|
+
- test/dummy/test/fixtures/users.yml
|
|
104
|
+
- test/dummy/test/models/user_test.rb
|
|
105
|
+
- test/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705
|
|
106
|
+
- test/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af
|
|
107
|
+
- test/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953
|
|
108
|
+
- test/dummy/tmp/cache/assets/test/sprockets/4050a4e5062ab95c9f32e9b6940821ea
|
|
109
|
+
- test/dummy/tmp/cache/assets/test/sprockets/5f1a0d05e77ca8b9a1fc2a47e17a8174
|
|
110
|
+
- test/dummy/tmp/cache/assets/test/sprockets/87b209c0c9da28094a8d5581a21262c6
|
|
111
|
+
- test/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994
|
|
112
|
+
- test/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6
|
|
113
|
+
- test/dummy/tmp/cache/assets/test/sprockets/f56253b5f374fff1a33fbbc9881c9124
|
|
114
|
+
- test/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655
|
|
89
115
|
- test/simple_crud_test.rb
|
|
90
116
|
- test/test_helper.rb
|
|
91
117
|
homepage: https://github.com/Jordan-deJong/simple_crud.git
|
|
@@ -114,10 +140,19 @@ specification_version: 4
|
|
|
114
140
|
summary: Clean up that CRUD!
|
|
115
141
|
test_files:
|
|
116
142
|
- test/dummy/app/assets/javascripts/application.js
|
|
143
|
+
- test/dummy/app/assets/javascripts/users.js
|
|
117
144
|
- test/dummy/app/assets/stylesheets/application.css
|
|
145
|
+
- test/dummy/app/assets/stylesheets/users.css
|
|
118
146
|
- test/dummy/app/controllers/application_controller.rb
|
|
147
|
+
- test/dummy/app/controllers/users_controller.rb
|
|
119
148
|
- test/dummy/app/helpers/application_helper.rb
|
|
149
|
+
- test/dummy/app/helpers/users_helper.rb
|
|
150
|
+
- test/dummy/app/models/user.rb
|
|
120
151
|
- test/dummy/app/views/layouts/application.html.erb
|
|
152
|
+
- test/dummy/app/views/users/edit.html.erb
|
|
153
|
+
- test/dummy/app/views/users/index.html.erb
|
|
154
|
+
- test/dummy/app/views/users/new.html.erb
|
|
155
|
+
- test/dummy/app/views/users/show.html.erb
|
|
121
156
|
- test/dummy/bin/bundle
|
|
122
157
|
- test/dummy/bin/rails
|
|
123
158
|
- test/dummy/bin/rake
|
|
@@ -141,7 +176,11 @@ test_files:
|
|
|
141
176
|
- test/dummy/config/routes.rb
|
|
142
177
|
- test/dummy/config/secrets.yml
|
|
143
178
|
- test/dummy/config.ru
|
|
179
|
+
- test/dummy/db/development.sqlite3
|
|
180
|
+
- test/dummy/db/migrate/20150211054043_create_users.rb
|
|
181
|
+
- test/dummy/db/schema.rb
|
|
144
182
|
- test/dummy/db/test.sqlite3
|
|
183
|
+
- test/dummy/log/development.log
|
|
145
184
|
- test/dummy/log/test.log
|
|
146
185
|
- test/dummy/public/404.html
|
|
147
186
|
- test/dummy/public/422.html
|
|
@@ -149,6 +188,19 @@ test_files:
|
|
|
149
188
|
- test/dummy/public/favicon.ico
|
|
150
189
|
- test/dummy/Rakefile
|
|
151
190
|
- test/dummy/README.rdoc
|
|
191
|
+
- test/dummy/test/controllers/users_controller_test.rb
|
|
192
|
+
- test/dummy/test/fixtures/users.yml
|
|
193
|
+
- test/dummy/test/models/user_test.rb
|
|
194
|
+
- test/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705
|
|
195
|
+
- test/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af
|
|
196
|
+
- test/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953
|
|
197
|
+
- test/dummy/tmp/cache/assets/test/sprockets/4050a4e5062ab95c9f32e9b6940821ea
|
|
198
|
+
- test/dummy/tmp/cache/assets/test/sprockets/5f1a0d05e77ca8b9a1fc2a47e17a8174
|
|
199
|
+
- test/dummy/tmp/cache/assets/test/sprockets/87b209c0c9da28094a8d5581a21262c6
|
|
200
|
+
- test/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994
|
|
201
|
+
- test/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6
|
|
202
|
+
- test/dummy/tmp/cache/assets/test/sprockets/f56253b5f374fff1a33fbbc9881c9124
|
|
203
|
+
- test/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655
|
|
152
204
|
- test/simple_crud_test.rb
|
|
153
205
|
- test/test_helper.rb
|
|
154
206
|
has_rdoc:
|