enju_library 0.1.2 → 0.2.0.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.rdoc +3 -3
- data/Rakefile +15 -8
- data/app/controllers/accepts_controller.rb +13 -3
- data/app/controllers/baskets_controller.rb +11 -1
- data/app/controllers/bookstores_controller.rb +12 -1
- data/app/controllers/budget_types_controller.rb +13 -2
- data/app/controllers/concerns/enju_library/controller.rb +43 -0
- data/app/controllers/libraries_controller.rb +13 -4
- data/app/controllers/library_groups_controller.rb +16 -6
- data/app/controllers/request_status_types_controller.rb +13 -2
- data/app/controllers/request_types_controller.rb +13 -2
- data/app/controllers/search_engines_controller.rb +13 -2
- data/app/controllers/shelves_controller.rb +14 -4
- data/app/controllers/subscribes_controller.rb +12 -2
- data/app/controllers/subscriptions_controller.rb +12 -3
- data/app/controllers/withdraws_controller.rb +14 -3
- data/app/helpers/shelves_helper.rb +2 -2
- data/app/models/accept.rb +2 -4
- data/app/models/basket.rb +0 -2
- data/app/models/budget_type.rb +0 -1
- data/app/models/concerns/enju_library/enju_item.rb +32 -0
- data/app/models/library_group.rb +9 -16
- data/app/models/request_status_type.rb +0 -1
- data/app/models/request_type.rb +0 -1
- data/app/models/search_engine.rb +0 -1
- data/app/models/withdraw.rb +8 -4
- data/app/policies/accept_policy.rb +21 -0
- data/app/policies/basket_policy.rb +21 -0
- data/app/policies/bookstore_policy.rb +23 -0
- data/app/policies/budget_type_policy.rb +21 -0
- data/app/policies/library_group_policy.rb +23 -0
- data/app/policies/library_policy.rb +25 -0
- data/app/policies/request_status_type_policy.rb +21 -0
- data/app/policies/request_type_policy.rb +21 -0
- data/app/policies/search_engine_policy.rb +21 -0
- data/app/policies/shelf_policy.rb +23 -0
- data/app/policies/subscribe_policy.rb +21 -0
- data/app/policies/subscription_policy.rb +21 -0
- data/app/policies/withdraw_policy.rb +21 -0
- data/app/views/accepts/index.html.erb +1 -1
- data/app/views/accepts/show.html.erb +1 -1
- data/app/views/baskets/edit.html.erb +1 -1
- data/app/views/baskets/new.html.erb +3 -1
- data/app/views/bookstores/index.html.erb +4 -4
- data/app/views/bookstores/show.html.erb +2 -2
- data/app/views/budget_types/index.html.erb +4 -4
- data/app/views/budget_types/show.html.erb +2 -2
- data/app/views/libraries/{_map.mobile.erb → _map.html+phone.erb} +0 -0
- data/app/views/libraries/index.html.erb +4 -4
- data/app/views/libraries/{show.mobile.erb → show.html+phone.erb} +0 -0
- data/app/views/libraries/show.html.erb +5 -5
- data/app/views/library_groups/_color_fields.html.erb +5 -0
- data/app/views/library_groups/_form.html.erb +17 -7
- data/app/views/library_groups/edit.html.erb +1 -1
- data/app/views/library_groups/index.html.erb +1 -1
- data/app/views/library_groups/show.html.erb +6 -2
- data/app/views/picture_files/_index_shelf.html.erb +4 -4
- data/app/views/request_status_types/index.html.erb +6 -4
- data/app/views/request_status_types/show.html.erb +1 -1
- data/app/views/request_types/index.html.erb +6 -4
- data/app/views/request_types/show.html.erb +1 -1
- data/app/views/search_engines/index.html.erb +4 -4
- data/app/views/search_engines/show.html.erb +2 -2
- data/app/views/shelves/_library_facet.html.erb +1 -1
- data/app/views/shelves/index.html.erb +4 -4
- data/app/views/shelves/{show.mobile.erb → show.html+phone.erb} +0 -0
- data/app/views/shelves/show.html.erb +3 -3
- data/app/views/subscriptions/index.html.erb +3 -1
- data/app/views/subscriptions/show.html.erb +1 -1
- data/app/views/withdraws/index.html.erb +1 -1
- data/app/views/withdraws/show.html.erb +1 -1
- data/config/locales/translation_en.yml +2 -1
- data/config/locales/translation_ja.yml +2 -1
- data/db/migrate/20151213070943_add_translation_table_to_library_group.rb +13 -0
- data/db/migrate/20151213072705_add_footer_banner_to_library_group.rb +9 -0
- data/lib/enju_library/engine.rb +3 -0
- data/lib/enju_library/version.rb +1 -1
- data/lib/enju_library.rb +0 -41
- data/lib/generators/enju_library/setup/setup_generator.rb +2 -0
- data/lib/generators/enju_library/setup/templates/db/fixtures/library_group/translations.yml +10 -0
- data/lib/tasks/enju_library_tasks.rake +6 -2
- data/spec/controllers/accepts_controller_spec.rb +6 -6
- data/spec/controllers/baskets_controller_spec.rb +7 -7
- data/spec/controllers/bookstores_controller_spec.rb +11 -11
- data/spec/controllers/budget_types_controller_spec.rb +1 -1
- data/spec/controllers/libraries_controller_spec.rb +9 -9
- data/spec/controllers/library_groups_controller_spec.rb +3 -3
- data/spec/controllers/request_status_types_controller_spec.rb +16 -16
- data/spec/controllers/request_types_controller_spec.rb +16 -16
- data/spec/controllers/search_engines_controller_spec.rb +13 -13
- data/spec/controllers/shelves_controller_spec.rb +10 -9
- data/spec/controllers/subscribes_controller_spec.rb +8 -8
- data/spec/controllers/subscriptions_controller_spec.rb +8 -8
- data/spec/controllers/withdraws_controller_spec.rb +11 -3
- data/spec/dummy/app/controllers/application_controller.rb +6 -3
- data/spec/dummy/app/models/user.rb +2 -2
- data/spec/dummy/config/application.rb +8 -38
- data/spec/dummy/config/environments/development.rb +22 -18
- data/spec/dummy/config/environments/production.rb +46 -34
- data/spec/dummy/config/environments/test.rb +21 -14
- data/spec/dummy/config/initializers/enju_leaf.rb +6 -0
- data/spec/dummy/db/schema.rb +13 -1
- data/spec/models/withdraw_spec.rb +2 -0
- data/spec/spec_helper.rb +1 -1
- data/spec/views/accepts/index.html.erb_spec.rb +1 -0
- data/spec/views/budget_types/index.html.erb_spec.rb +1 -0
- data/spec/views/budget_types/show.html.erb_spec.rb +1 -0
- data/spec/views/libraries/show.html.erb_spec.rb +2 -1
- data/spec/views/library_groups/edit.html.erb_spec.rb +1 -0
- data/spec/views/library_groups/show.html.erb_spec.rb +2 -0
- data/spec/views/withdraws/index.html.erb_spec.rb +2 -0
- metadata +52 -105
- data/app/models/enju_library/ability.rb +0 -72
- data/lib/enju_library/item.rb +0 -39
- data/spec/dummy/app/models/ability.rb +0 -68
@@ -100,7 +100,7 @@ describe LibrariesController do
|
|
100
100
|
|
101
101
|
it "assigns the requested library as @library" do
|
102
102
|
get :new
|
103
|
-
assigns(:library).
|
103
|
+
assigns(:library).should be_nil
|
104
104
|
end
|
105
105
|
end
|
106
106
|
|
@@ -109,7 +109,7 @@ describe LibrariesController do
|
|
109
109
|
|
110
110
|
it "should not assign the requested library as @library" do
|
111
111
|
get :new
|
112
|
-
assigns(:library).
|
112
|
+
assigns(:library).should be_nil
|
113
113
|
response.should be_forbidden
|
114
114
|
end
|
115
115
|
end
|
@@ -117,7 +117,7 @@ describe LibrariesController do
|
|
117
117
|
describe "When not logged in" do
|
118
118
|
it "should not assign the requested library as @library" do
|
119
119
|
get :new
|
120
|
-
assigns(:library).
|
120
|
+
assigns(:library).should be_nil
|
121
121
|
response.should redirect_to(new_user_session_url)
|
122
122
|
end
|
123
123
|
end
|
@@ -208,7 +208,7 @@ describe LibrariesController do
|
|
208
208
|
describe "with valid params" do
|
209
209
|
it "assigns a newly created library as @library" do
|
210
210
|
post :create, :library => @attrs
|
211
|
-
assigns(:library).should
|
211
|
+
assigns(:library).should be_nil
|
212
212
|
end
|
213
213
|
|
214
214
|
it "should be forbidden" do
|
@@ -220,7 +220,7 @@ describe LibrariesController do
|
|
220
220
|
describe "with invalid params" do
|
221
221
|
it "assigns a newly created but unsaved library as @library" do
|
222
222
|
post :create, :library => @invalid_attrs
|
223
|
-
assigns(:library).
|
223
|
+
assigns(:library).should be_nil
|
224
224
|
end
|
225
225
|
|
226
226
|
it "should be forbidden" do
|
@@ -236,7 +236,7 @@ describe LibrariesController do
|
|
236
236
|
describe "with valid params" do
|
237
237
|
it "assigns a newly created library as @library" do
|
238
238
|
post :create, :library => @attrs
|
239
|
-
assigns(:library).should
|
239
|
+
assigns(:library).should be_nil
|
240
240
|
end
|
241
241
|
|
242
242
|
it "should be forbidden" do
|
@@ -248,7 +248,7 @@ describe LibrariesController do
|
|
248
248
|
describe "with invalid params" do
|
249
249
|
it "assigns a newly created but unsaved library as @library" do
|
250
250
|
post :create, :library => @invalid_attrs
|
251
|
-
assigns(:library).
|
251
|
+
assigns(:library).should be_nil
|
252
252
|
end
|
253
253
|
|
254
254
|
it "should be forbidden" do
|
@@ -262,7 +262,7 @@ describe LibrariesController do
|
|
262
262
|
describe "with valid params" do
|
263
263
|
it "assigns a newly created library as @library" do
|
264
264
|
post :create, :library => @attrs
|
265
|
-
assigns(:library).should
|
265
|
+
assigns(:library).should be_nil
|
266
266
|
end
|
267
267
|
|
268
268
|
it "should be redirected to new session url" do
|
@@ -274,7 +274,7 @@ describe LibrariesController do
|
|
274
274
|
describe "with invalid params" do
|
275
275
|
it "assigns a newly created but unsaved library as @library" do
|
276
276
|
post :create, :library => @invalid_attrs
|
277
|
-
assigns(:library).
|
277
|
+
assigns(:library).should be_nil
|
278
278
|
end
|
279
279
|
|
280
280
|
it "should be redirected to new session url" do
|
@@ -16,8 +16,8 @@ describe LibraryGroupsController do
|
|
16
16
|
describe "When not logged in" do
|
17
17
|
it "assigns all library_groups as @library_groups" do
|
18
18
|
get :index
|
19
|
-
assigns(:library_groups).
|
20
|
-
response.should
|
19
|
+
assigns(:library_groups).should be_nil
|
20
|
+
response.should redirect_to(new_user_session_url)
|
21
21
|
end
|
22
22
|
end
|
23
23
|
end
|
@@ -36,7 +36,7 @@ describe LibraryGroupsController do
|
|
36
36
|
it "assigns the requested library_group as @library_group" do
|
37
37
|
get :show, :id => 1
|
38
38
|
assigns(:library_group).should eq(LibraryGroup.find(1))
|
39
|
-
response.should
|
39
|
+
response.should redirect_to(new_user_session_url)
|
40
40
|
end
|
41
41
|
end
|
42
42
|
end
|
@@ -19,7 +19,7 @@ describe RequestStatusTypesController do
|
|
19
19
|
|
20
20
|
it "assigns all request_status_types as @request_status_types" do
|
21
21
|
get :index
|
22
|
-
assigns(:request_status_types).should eq(RequestStatusType.
|
22
|
+
assigns(:request_status_types).should eq(RequestStatusType.order(:position))
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
@@ -28,7 +28,7 @@ describe RequestStatusTypesController do
|
|
28
28
|
|
29
29
|
it "assigns all request_status_types as @request_status_types" do
|
30
30
|
get :index
|
31
|
-
assigns(:request_status_types).should eq(RequestStatusType.
|
31
|
+
assigns(:request_status_types).should eq(RequestStatusType.order(:position))
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
@@ -37,7 +37,7 @@ describe RequestStatusTypesController do
|
|
37
37
|
|
38
38
|
it "should not assign request_status_types as @request_status_types" do
|
39
39
|
get :index
|
40
|
-
assigns(:request_status_types).should
|
40
|
+
assigns(:request_status_types).should be_nil
|
41
41
|
response.should be_forbidden
|
42
42
|
end
|
43
43
|
end
|
@@ -45,7 +45,7 @@ describe RequestStatusTypesController do
|
|
45
45
|
describe "When not logged in" do
|
46
46
|
it "should not assign request_status_types as @request_status_types" do
|
47
47
|
get :index
|
48
|
-
assigns(:request_status_types).should
|
48
|
+
assigns(:request_status_types).should be_nil
|
49
49
|
response.should redirect_to(new_user_session_url)
|
50
50
|
end
|
51
51
|
end
|
@@ -97,7 +97,7 @@ describe RequestStatusTypesController do
|
|
97
97
|
|
98
98
|
it "assigns the requested request_status_type as @request_status_type" do
|
99
99
|
get :new
|
100
|
-
assigns(:request_status_type).
|
100
|
+
assigns(:request_status_type).should be_nil
|
101
101
|
response.should be_forbidden
|
102
102
|
end
|
103
103
|
end
|
@@ -107,7 +107,7 @@ describe RequestStatusTypesController do
|
|
107
107
|
|
108
108
|
it "should not assign the requested request_status_type as @request_status_type" do
|
109
109
|
get :new
|
110
|
-
assigns(:request_status_type).
|
110
|
+
assigns(:request_status_type).should be_nil
|
111
111
|
response.should be_forbidden
|
112
112
|
end
|
113
113
|
end
|
@@ -117,7 +117,7 @@ describe RequestStatusTypesController do
|
|
117
117
|
|
118
118
|
it "should not assign the requested request_status_type as @request_status_type" do
|
119
119
|
get :new
|
120
|
-
assigns(:request_status_type).
|
120
|
+
assigns(:request_status_type).should be_nil
|
121
121
|
response.should be_forbidden
|
122
122
|
end
|
123
123
|
end
|
@@ -125,7 +125,7 @@ describe RequestStatusTypesController do
|
|
125
125
|
describe "When not logged in" do
|
126
126
|
it "should not assign the requested request_status_type as @request_status_type" do
|
127
127
|
get :new
|
128
|
-
assigns(:request_status_type).
|
128
|
+
assigns(:request_status_type).should be_nil
|
129
129
|
response.should redirect_to(new_user_session_url)
|
130
130
|
end
|
131
131
|
end
|
@@ -183,7 +183,7 @@ describe RequestStatusTypesController do
|
|
183
183
|
describe "with valid params" do
|
184
184
|
it "assigns a newly created request_status_type as @request_status_type" do
|
185
185
|
post :create, :request_status_type => @attrs
|
186
|
-
assigns(:request_status_type).should
|
186
|
+
assigns(:request_status_type).should be_nil
|
187
187
|
end
|
188
188
|
|
189
189
|
it "should be forbidden" do
|
@@ -195,7 +195,7 @@ describe RequestStatusTypesController do
|
|
195
195
|
describe "with invalid params" do
|
196
196
|
it "assigns a newly created but unsaved request_status_type as @request_status_type" do
|
197
197
|
post :create, :request_status_type => @invalid_attrs
|
198
|
-
assigns(:request_status_type).
|
198
|
+
assigns(:request_status_type).should be_nil
|
199
199
|
end
|
200
200
|
|
201
201
|
it "should be forbidden" do
|
@@ -211,7 +211,7 @@ describe RequestStatusTypesController do
|
|
211
211
|
describe "with valid params" do
|
212
212
|
it "assigns a newly created request_status_type as @request_status_type" do
|
213
213
|
post :create, :request_status_type => @attrs
|
214
|
-
assigns(:request_status_type).should
|
214
|
+
assigns(:request_status_type).should be_nil
|
215
215
|
end
|
216
216
|
|
217
217
|
it "should be forbidden" do
|
@@ -223,7 +223,7 @@ describe RequestStatusTypesController do
|
|
223
223
|
describe "with invalid params" do
|
224
224
|
it "assigns a newly created but unsaved request_status_type as @request_status_type" do
|
225
225
|
post :create, :request_status_type => @invalid_attrs
|
226
|
-
assigns(:request_status_type).
|
226
|
+
assigns(:request_status_type).should be_nil
|
227
227
|
end
|
228
228
|
|
229
229
|
it "should be forbidden" do
|
@@ -239,7 +239,7 @@ describe RequestStatusTypesController do
|
|
239
239
|
describe "with valid params" do
|
240
240
|
it "assigns a newly created request_status_type as @request_status_type" do
|
241
241
|
post :create, :request_status_type => @attrs
|
242
|
-
assigns(:request_status_type).should
|
242
|
+
assigns(:request_status_type).should be_nil
|
243
243
|
end
|
244
244
|
|
245
245
|
it "should be forbidden" do
|
@@ -251,7 +251,7 @@ describe RequestStatusTypesController do
|
|
251
251
|
describe "with invalid params" do
|
252
252
|
it "assigns a newly created but unsaved request_status_type as @request_status_type" do
|
253
253
|
post :create, :request_status_type => @invalid_attrs
|
254
|
-
assigns(:request_status_type).
|
254
|
+
assigns(:request_status_type).should be_nil
|
255
255
|
end
|
256
256
|
|
257
257
|
it "should be forbidden" do
|
@@ -265,7 +265,7 @@ describe RequestStatusTypesController do
|
|
265
265
|
describe "with valid params" do
|
266
266
|
it "assigns a newly created request_status_type as @request_status_type" do
|
267
267
|
post :create, :request_status_type => @attrs
|
268
|
-
assigns(:request_status_type).should
|
268
|
+
assigns(:request_status_type).should be_nil
|
269
269
|
end
|
270
270
|
|
271
271
|
it "should be forbidden" do
|
@@ -277,7 +277,7 @@ describe RequestStatusTypesController do
|
|
277
277
|
describe "with invalid params" do
|
278
278
|
it "assigns a newly created but unsaved request_status_type as @request_status_type" do
|
279
279
|
post :create, :request_status_type => @invalid_attrs
|
280
|
-
assigns(:request_status_type).
|
280
|
+
assigns(:request_status_type).should be_nil
|
281
281
|
end
|
282
282
|
|
283
283
|
it "should be forbidden" do
|
@@ -19,7 +19,7 @@ describe RequestTypesController do
|
|
19
19
|
|
20
20
|
it "assigns all request_types as @request_types" do
|
21
21
|
get :index
|
22
|
-
assigns(:request_types).should eq(RequestType.
|
22
|
+
assigns(:request_types).should eq(RequestType.order(:position))
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
@@ -28,7 +28,7 @@ describe RequestTypesController do
|
|
28
28
|
|
29
29
|
it "assigns all request_types as @request_types" do
|
30
30
|
get :index
|
31
|
-
assigns(:request_types).should eq(RequestType.
|
31
|
+
assigns(:request_types).should eq(RequestType.order(:position))
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
@@ -37,7 +37,7 @@ describe RequestTypesController do
|
|
37
37
|
|
38
38
|
it "should not assign request_types as @request_types" do
|
39
39
|
get :index
|
40
|
-
assigns(:request_types).should
|
40
|
+
assigns(:request_types).should be_nil
|
41
41
|
response.should be_forbidden
|
42
42
|
end
|
43
43
|
end
|
@@ -45,7 +45,7 @@ describe RequestTypesController do
|
|
45
45
|
describe "When not logged in" do
|
46
46
|
it "should not assign request_types as @request_types" do
|
47
47
|
get :index
|
48
|
-
assigns(:request_types).should
|
48
|
+
assigns(:request_types).should be_nil
|
49
49
|
response.should redirect_to(new_user_session_url)
|
50
50
|
end
|
51
51
|
end
|
@@ -97,7 +97,7 @@ describe RequestTypesController do
|
|
97
97
|
|
98
98
|
it "assigns the requested request_type as @request_type" do
|
99
99
|
get :new
|
100
|
-
assigns(:request_type).
|
100
|
+
assigns(:request_type).should be_nil
|
101
101
|
response.should be_forbidden
|
102
102
|
end
|
103
103
|
end
|
@@ -107,7 +107,7 @@ describe RequestTypesController do
|
|
107
107
|
|
108
108
|
it "should not assign the requested request_type as @request_type" do
|
109
109
|
get :new
|
110
|
-
assigns(:request_type).
|
110
|
+
assigns(:request_type).should be_nil
|
111
111
|
response.should be_forbidden
|
112
112
|
end
|
113
113
|
end
|
@@ -117,7 +117,7 @@ describe RequestTypesController do
|
|
117
117
|
|
118
118
|
it "should not assign the requested request_type as @request_type" do
|
119
119
|
get :new
|
120
|
-
assigns(:request_type).
|
120
|
+
assigns(:request_type).should be_nil
|
121
121
|
response.should be_forbidden
|
122
122
|
end
|
123
123
|
end
|
@@ -125,7 +125,7 @@ describe RequestTypesController do
|
|
125
125
|
describe "When not logged in" do
|
126
126
|
it "should not assign the requested request_type as @request_type" do
|
127
127
|
get :new
|
128
|
-
assigns(:request_type).
|
128
|
+
assigns(:request_type).should be_nil
|
129
129
|
response.should redirect_to(new_user_session_url)
|
130
130
|
end
|
131
131
|
end
|
@@ -183,7 +183,7 @@ describe RequestTypesController do
|
|
183
183
|
describe "with valid params" do
|
184
184
|
it "assigns a newly created request_type as @request_type" do
|
185
185
|
post :create, :request_type => @attrs
|
186
|
-
assigns(:request_type).should
|
186
|
+
assigns(:request_type).should be_nil
|
187
187
|
end
|
188
188
|
|
189
189
|
it "should be forbidden" do
|
@@ -195,7 +195,7 @@ describe RequestTypesController do
|
|
195
195
|
describe "with invalid params" do
|
196
196
|
it "assigns a newly created but unsaved request_type as @request_type" do
|
197
197
|
post :create, :request_type => @invalid_attrs
|
198
|
-
assigns(:request_type).
|
198
|
+
assigns(:request_type).should be_nil
|
199
199
|
end
|
200
200
|
|
201
201
|
it "should be forbidden" do
|
@@ -211,7 +211,7 @@ describe RequestTypesController do
|
|
211
211
|
describe "with valid params" do
|
212
212
|
it "assigns a newly created request_type as @request_type" do
|
213
213
|
post :create, :request_type => @attrs
|
214
|
-
assigns(:request_type).should
|
214
|
+
assigns(:request_type).should be_nil
|
215
215
|
end
|
216
216
|
|
217
217
|
it "should be forbidden" do
|
@@ -223,7 +223,7 @@ describe RequestTypesController do
|
|
223
223
|
describe "with invalid params" do
|
224
224
|
it "assigns a newly created but unsaved request_type as @request_type" do
|
225
225
|
post :create, :request_type => @invalid_attrs
|
226
|
-
assigns(:request_type).
|
226
|
+
assigns(:request_type).should be_nil
|
227
227
|
end
|
228
228
|
|
229
229
|
it "should be forbidden" do
|
@@ -239,7 +239,7 @@ describe RequestTypesController do
|
|
239
239
|
describe "with valid params" do
|
240
240
|
it "assigns a newly created request_type as @request_type" do
|
241
241
|
post :create, :request_type => @attrs
|
242
|
-
assigns(:request_type).should
|
242
|
+
assigns(:request_type).should be_nil
|
243
243
|
end
|
244
244
|
|
245
245
|
it "should be forbidden" do
|
@@ -251,7 +251,7 @@ describe RequestTypesController do
|
|
251
251
|
describe "with invalid params" do
|
252
252
|
it "assigns a newly created but unsaved request_type as @request_type" do
|
253
253
|
post :create, :request_type => @invalid_attrs
|
254
|
-
assigns(:request_type).
|
254
|
+
assigns(:request_type).should be_nil
|
255
255
|
end
|
256
256
|
|
257
257
|
it "should be forbidden" do
|
@@ -265,7 +265,7 @@ describe RequestTypesController do
|
|
265
265
|
describe "with valid params" do
|
266
266
|
it "assigns a newly created request_type as @request_type" do
|
267
267
|
post :create, :request_type => @attrs
|
268
|
-
assigns(:request_type).should
|
268
|
+
assigns(:request_type).should be_nil
|
269
269
|
end
|
270
270
|
|
271
271
|
it "should be forbidden" do
|
@@ -277,7 +277,7 @@ describe RequestTypesController do
|
|
277
277
|
describe "with invalid params" do
|
278
278
|
it "assigns a newly created but unsaved request_type as @request_type" do
|
279
279
|
post :create, :request_type => @invalid_attrs
|
280
|
-
assigns(:request_type).
|
280
|
+
assigns(:request_type).should be_nil
|
281
281
|
end
|
282
282
|
|
283
283
|
it "should be forbidden" do
|
@@ -19,7 +19,7 @@ describe SearchEnginesController do
|
|
19
19
|
|
20
20
|
it "assigns all search_engines as @search_engines" do
|
21
21
|
get :index
|
22
|
-
assigns(:search_engines).should eq(SearchEngine.
|
22
|
+
assigns(:search_engines).should eq(SearchEngine.order(:position))
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
@@ -28,7 +28,7 @@ describe SearchEnginesController do
|
|
28
28
|
|
29
29
|
it "assigns all search_engines as @search_engines" do
|
30
30
|
get :index
|
31
|
-
assigns(:search_engines).should eq(SearchEngine.
|
31
|
+
assigns(:search_engines).should eq(SearchEngine.order(:position))
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
@@ -37,7 +37,7 @@ describe SearchEnginesController do
|
|
37
37
|
|
38
38
|
it "assigns all search_engines as @search_engines" do
|
39
39
|
get :index
|
40
|
-
assigns(:search_engines).should
|
40
|
+
assigns(:search_engines).should be_nil
|
41
41
|
response.should be_forbidden
|
42
42
|
end
|
43
43
|
end
|
@@ -45,7 +45,7 @@ describe SearchEnginesController do
|
|
45
45
|
describe "When not logged in" do
|
46
46
|
it "assigns all search_engines as @search_engines" do
|
47
47
|
get :index
|
48
|
-
assigns(:search_engines).should
|
48
|
+
assigns(:search_engines).should be_nil
|
49
49
|
response.should redirect_to(new_user_session_url)
|
50
50
|
end
|
51
51
|
end
|
@@ -107,7 +107,7 @@ describe SearchEnginesController do
|
|
107
107
|
|
108
108
|
it "should not assign the requested search_engine as @search_engine" do
|
109
109
|
get :new
|
110
|
-
assigns(:search_engine).
|
110
|
+
assigns(:search_engine).should be_nil
|
111
111
|
response.should be_forbidden
|
112
112
|
end
|
113
113
|
end
|
@@ -117,7 +117,7 @@ describe SearchEnginesController do
|
|
117
117
|
|
118
118
|
it "should not assign the requested search_engine as @search_engine" do
|
119
119
|
get :new
|
120
|
-
assigns(:search_engine).
|
120
|
+
assigns(:search_engine).should be_nil
|
121
121
|
response.should be_forbidden
|
122
122
|
end
|
123
123
|
end
|
@@ -125,7 +125,7 @@ describe SearchEnginesController do
|
|
125
125
|
describe "When not logged in" do
|
126
126
|
it "should not assign the requested search_engine as @search_engine" do
|
127
127
|
get :new
|
128
|
-
assigns(:search_engine).
|
128
|
+
assigns(:search_engine).should be_nil
|
129
129
|
response.should redirect_to(new_user_session_url)
|
130
130
|
end
|
131
131
|
end
|
@@ -211,7 +211,7 @@ describe SearchEnginesController do
|
|
211
211
|
describe "with valid params" do
|
212
212
|
it "assigns a newly created search_engine as @search_engine" do
|
213
213
|
post :create, :search_engine => @attrs
|
214
|
-
assigns(:search_engine).should
|
214
|
+
assigns(:search_engine).should be_nil
|
215
215
|
end
|
216
216
|
|
217
217
|
it "should be forbidden" do
|
@@ -223,7 +223,7 @@ describe SearchEnginesController do
|
|
223
223
|
describe "with invalid params" do
|
224
224
|
it "assigns a newly created but unsaved search_engine as @search_engine" do
|
225
225
|
post :create, :search_engine => @invalid_attrs
|
226
|
-
assigns(:search_engine).
|
226
|
+
assigns(:search_engine).should be_nil
|
227
227
|
end
|
228
228
|
|
229
229
|
it "should be forbidden" do
|
@@ -239,7 +239,7 @@ describe SearchEnginesController do
|
|
239
239
|
describe "with valid params" do
|
240
240
|
it "assigns a newly created search_engine as @search_engine" do
|
241
241
|
post :create, :search_engine => @attrs
|
242
|
-
assigns(:search_engine).should
|
242
|
+
assigns(:search_engine).should be_nil
|
243
243
|
end
|
244
244
|
|
245
245
|
it "should be forbidden" do
|
@@ -251,7 +251,7 @@ describe SearchEnginesController do
|
|
251
251
|
describe "with invalid params" do
|
252
252
|
it "assigns a newly created but unsaved search_engine as @search_engine" do
|
253
253
|
post :create, :search_engine => @invalid_attrs
|
254
|
-
assigns(:search_engine).
|
254
|
+
assigns(:search_engine).should be_nil
|
255
255
|
end
|
256
256
|
|
257
257
|
it "should be forbidden" do
|
@@ -265,7 +265,7 @@ describe SearchEnginesController do
|
|
265
265
|
describe "with valid params" do
|
266
266
|
it "assigns a newly created search_engine as @search_engine" do
|
267
267
|
post :create, :search_engine => @attrs
|
268
|
-
assigns(:search_engine).should
|
268
|
+
assigns(:search_engine).should be_nil
|
269
269
|
end
|
270
270
|
|
271
271
|
it "should be forbidden" do
|
@@ -277,7 +277,7 @@ describe SearchEnginesController do
|
|
277
277
|
describe "with invalid params" do
|
278
278
|
it "assigns a newly created but unsaved search_engine as @search_engine" do
|
279
279
|
post :create, :search_engine => @invalid_attrs
|
280
|
-
assigns(:search_engine).
|
280
|
+
assigns(:search_engine).should be_nil
|
281
281
|
end
|
282
282
|
|
283
283
|
it "should be forbidden" do
|
@@ -93,7 +93,8 @@ describe ShelvesController do
|
|
93
93
|
|
94
94
|
it "assigns the requested shelf as @shelf" do
|
95
95
|
get :new
|
96
|
-
assigns(:shelf).
|
96
|
+
assigns(:shelf).should be_nil
|
97
|
+
response.should be_forbidden
|
97
98
|
end
|
98
99
|
end
|
99
100
|
|
@@ -102,7 +103,7 @@ describe ShelvesController do
|
|
102
103
|
|
103
104
|
it "should not assign the requested shelf as @shelf" do
|
104
105
|
get :new
|
105
|
-
assigns(:shelf).
|
106
|
+
assigns(:shelf).should be_nil
|
106
107
|
response.should be_forbidden
|
107
108
|
end
|
108
109
|
end
|
@@ -110,7 +111,7 @@ describe ShelvesController do
|
|
110
111
|
describe "When not logged in" do
|
111
112
|
it "should not assign the requested shelf as @shelf" do
|
112
113
|
get :new
|
113
|
-
assigns(:shelf).
|
114
|
+
assigns(:shelf).should be_nil
|
114
115
|
response.should redirect_to(new_user_session_url)
|
115
116
|
end
|
116
117
|
end
|
@@ -196,7 +197,7 @@ describe ShelvesController do
|
|
196
197
|
describe "with valid params" do
|
197
198
|
it "assigns a newly created shelf as @shelf" do
|
198
199
|
post :create, :shelf => @attrs
|
199
|
-
assigns(:shelf).should
|
200
|
+
assigns(:shelf).should be_nil
|
200
201
|
end
|
201
202
|
|
202
203
|
it "should be forbidden" do
|
@@ -208,7 +209,7 @@ describe ShelvesController do
|
|
208
209
|
describe "with invalid params" do
|
209
210
|
it "assigns a newly created but unsaved shelf as @shelf" do
|
210
211
|
post :create, :shelf => @invalid_attrs
|
211
|
-
assigns(:shelf).
|
212
|
+
assigns(:shelf).should be_nil
|
212
213
|
end
|
213
214
|
|
214
215
|
it "should be forbidden" do
|
@@ -224,7 +225,7 @@ describe ShelvesController do
|
|
224
225
|
describe "with valid params" do
|
225
226
|
it "assigns a newly created shelf as @shelf" do
|
226
227
|
post :create, :shelf => @attrs
|
227
|
-
assigns(:shelf).should
|
228
|
+
assigns(:shelf).should be_nil
|
228
229
|
end
|
229
230
|
|
230
231
|
it "should be forbidden" do
|
@@ -236,7 +237,7 @@ describe ShelvesController do
|
|
236
237
|
describe "with invalid params" do
|
237
238
|
it "assigns a newly created but unsaved shelf as @shelf" do
|
238
239
|
post :create, :shelf => @invalid_attrs
|
239
|
-
assigns(:shelf).
|
240
|
+
assigns(:shelf).should be_nil
|
240
241
|
end
|
241
242
|
|
242
243
|
it "should be forbidden" do
|
@@ -250,7 +251,7 @@ describe ShelvesController do
|
|
250
251
|
describe "with valid params" do
|
251
252
|
it "assigns a newly created shelf as @shelf" do
|
252
253
|
post :create, :shelf => @attrs
|
253
|
-
assigns(:shelf).should
|
254
|
+
assigns(:shelf).should be_nil
|
254
255
|
end
|
255
256
|
|
256
257
|
it "should be forbidden" do
|
@@ -262,7 +263,7 @@ describe ShelvesController do
|
|
262
263
|
describe "with invalid params" do
|
263
264
|
it "assigns a newly created but unsaved shelf as @shelf" do
|
264
265
|
post :create, :shelf => @invalid_attrs
|
265
|
-
assigns(:shelf).
|
266
|
+
assigns(:shelf).should be_nil
|
266
267
|
end
|
267
268
|
|
268
269
|
it "should be forbidden" do
|
@@ -35,7 +35,7 @@ describe SubscribesController do
|
|
35
35
|
|
36
36
|
it "should be forbidden" do
|
37
37
|
get :index
|
38
|
-
assigns(:subscribes).should
|
38
|
+
assigns(:subscribes).should be_nil
|
39
39
|
response.should be_forbidden
|
40
40
|
end
|
41
41
|
end
|
@@ -43,7 +43,7 @@ describe SubscribesController do
|
|
43
43
|
describe "When not logged in" do
|
44
44
|
it "assigns all subscribes as @subscribes" do
|
45
45
|
get :index
|
46
|
-
assigns(:subscribes).should
|
46
|
+
assigns(:subscribes).should be_nil
|
47
47
|
response.should redirect_to(new_user_session_url)
|
48
48
|
end
|
49
49
|
end
|
@@ -115,7 +115,7 @@ describe SubscribesController do
|
|
115
115
|
|
116
116
|
it "should not assign the requested subscribe as @subscribe" do
|
117
117
|
get :new
|
118
|
-
assigns(:subscribe).
|
118
|
+
assigns(:subscribe).should be_nil
|
119
119
|
response.should be_forbidden
|
120
120
|
end
|
121
121
|
end
|
@@ -123,7 +123,7 @@ describe SubscribesController do
|
|
123
123
|
describe "When not logged in" do
|
124
124
|
it "should not assign the requested subscribe as @subscribe" do
|
125
125
|
get :new
|
126
|
-
assigns(:subscribe).
|
126
|
+
assigns(:subscribe).should be_nil
|
127
127
|
response.should redirect_to(new_user_session_url)
|
128
128
|
end
|
129
129
|
end
|
@@ -237,7 +237,7 @@ describe SubscribesController do
|
|
237
237
|
describe "with valid params" do
|
238
238
|
it "assigns a newly created subscribe as @subscribe" do
|
239
239
|
post :create, :subscribe => @attrs
|
240
|
-
assigns(:subscribe).should
|
240
|
+
assigns(:subscribe).should be_nil
|
241
241
|
end
|
242
242
|
|
243
243
|
it "should be forbidden" do
|
@@ -249,7 +249,7 @@ describe SubscribesController do
|
|
249
249
|
describe "with invalid params" do
|
250
250
|
it "assigns a newly created but unsaved subscribe as @subscribe" do
|
251
251
|
post :create, :subscribe => @invalid_attrs
|
252
|
-
assigns(:subscribe).
|
252
|
+
assigns(:subscribe).should be_nil
|
253
253
|
end
|
254
254
|
|
255
255
|
it "should be forbidden" do
|
@@ -263,7 +263,7 @@ describe SubscribesController do
|
|
263
263
|
describe "with valid params" do
|
264
264
|
it "assigns a newly created subscribe as @subscribe" do
|
265
265
|
post :create, :subscribe => @attrs
|
266
|
-
assigns(:subscribe).should
|
266
|
+
assigns(:subscribe).should be_nil
|
267
267
|
end
|
268
268
|
|
269
269
|
it "should be forbidden" do
|
@@ -275,7 +275,7 @@ describe SubscribesController do
|
|
275
275
|
describe "with invalid params" do
|
276
276
|
it "assigns a newly created but unsaved subscribe as @subscribe" do
|
277
277
|
post :create, :subscribe => @invalid_attrs
|
278
|
-
assigns(:subscribe).
|
278
|
+
assigns(:subscribe).should be_nil
|
279
279
|
end
|
280
280
|
|
281
281
|
it "should be forbidden" do
|