enju_circulation 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/app/controllers/carrier_type_has_checkout_types_controller.rb +14 -4
- data/app/controllers/checked_items_controller.rb +13 -2
- data/app/controllers/checkins_controller.rb +13 -3
- data/app/controllers/checkout_types_controller.rb +12 -2
- data/app/controllers/checkouts_controller.rb +26 -25
- data/app/controllers/circulation_statuses_controller.rb +11 -1
- data/app/controllers/concerns/enju_circulation/controller.rb +12 -0
- data/app/controllers/demands_controller.rb +12 -2
- data/app/controllers/item_has_use_restrictions_controller.rb +13 -2
- data/app/controllers/lending_policies_controller.rb +18 -4
- data/app/controllers/manifestation_checkout_stats_controller.rb +14 -6
- data/app/controllers/manifestation_reserve_stats_controller.rb +15 -4
- data/app/controllers/reserves_controller.rb +17 -9
- data/app/controllers/use_restrictions_controller.rb +11 -1
- data/app/controllers/user_checkout_stats_controller.rb +14 -4
- data/app/controllers/user_group_has_checkout_types_controller.rb +12 -2
- data/app/controllers/user_reserve_stats_controller.rb +14 -4
- data/app/helpers/items_helper.rb +2 -2
- data/app/jobs/manifestation_checkout_stat_job.rb +7 -0
- data/app/jobs/manifestation_reserve_stat_job.rb +7 -0
- data/app/jobs/user_checkout_stat_job.rb +7 -0
- data/app/jobs/user_reserve_stat_job.rb +7 -0
- data/app/models/checked_item.rb +1 -1
- data/app/models/concerns/enju_circulation/enju_accept.rb +16 -0
- data/app/models/concerns/enju_circulation/enju_basket.rb +30 -0
- data/app/models/concerns/enju_circulation/enju_carrier_type.rb +11 -0
- data/app/models/concerns/enju_circulation/enju_item.rb +157 -0
- data/app/models/concerns/enju_circulation/enju_manifestation.rb +77 -0
- data/app/models/concerns/enju_circulation/enju_profile.rb +13 -0
- data/app/models/concerns/enju_circulation/enju_user.rb +50 -0
- data/app/models/concerns/enju_circulation/enju_user_group.rb +17 -0
- data/app/models/concerns/enju_circulation/enju_withdraw.rb +16 -0
- data/app/models/manifestation_checkout_stat_state_machine.rb +1 -1
- data/app/models/reserve.rb +7 -2
- data/app/policies/carrier_type_has_checkout_type_policy.rb +21 -0
- data/app/policies/checked_item_policy.rb +21 -0
- data/app/policies/checkin_policy.rb +21 -0
- data/app/policies/checkout_policy.rb +39 -0
- data/app/policies/checkout_type_policy.rb +23 -0
- data/app/policies/circulation_status_policy.rb +23 -0
- data/app/policies/demand_policy.rb +21 -0
- data/app/policies/item_has_use_restriction_policy.rb +21 -0
- data/app/policies/item_policy.rb +27 -0
- data/app/policies/lending_policy_policy.rb +21 -0
- data/app/policies/manifestation_checkout_stat_policy.rb +21 -0
- data/app/policies/manifestation_reserve_stat_policy.rb +21 -0
- data/app/policies/reserve_policy.rb +37 -0
- data/app/policies/use_restriction_policy.rb +23 -0
- data/app/policies/user_checkout_stat_policy.rb +21 -0
- data/app/policies/user_group_has_checkout_type_policy.rb +21 -0
- data/app/policies/user_reserve_stat_policy.rb +21 -0
- data/app/views/carrier_type_has_checkout_types/index.html.erb +3 -3
- data/app/views/carrier_type_has_checkout_types/show.html.erb +1 -1
- data/app/views/carrier_types/_carrier_type_has_checkout_type_fields.html.erb +5 -0
- data/app/views/carrier_types/_checkout_form.html.erb +2 -4
- data/app/views/checkout_types/index.html.erb +4 -4
- data/app/views/checkout_types/show.html.erb +2 -2
- data/app/views/checkouts/_index.html.erb +1 -1
- data/app/views/checkouts/_index_overdue.html.erb +4 -5
- data/app/views/checkouts/_index_user.html.erb +5 -5
- data/app/views/checkouts/_list.html.erb +2 -2
- data/app/views/checkouts/_reserved_facet.html.erb +2 -2
- data/app/views/checkouts/edit.html.erb +1 -1
- data/app/views/checkouts/index.html.erb +2 -2
- data/app/views/checkouts/index.rss.builder +2 -2
- data/app/views/checkouts/index.txt.erb +1 -1
- data/app/views/checkouts/show.html.erb +10 -6
- data/app/views/circulation_statuses/index.html.erb +4 -4
- data/app/views/circulation_statuses/show.html.erb +1 -1
- data/app/views/reserves/_state_facet.html.erb +2 -2
- data/app/views/reserves/index.html.erb +6 -4
- data/app/views/reserves/show.html.erb +1 -1
- data/app/views/use_restrictions/index.html.erb +4 -4
- data/app/views/use_restrictions/show.html.erb +1 -1
- data/app/views/user_group_has_checkout_types/index.html.erb +3 -3
- data/app/views/user_group_has_checkout_types/show.html.erb +1 -1
- data/app/views/user_groups/_checkout_form.html.erb +2 -16
- data/app/views/user_groups/_user_group_has_checkout_type_fields.html.erb +14 -0
- data/db/migrate/20160703184619_add_most_recent_to_reserve_transitions.rb +9 -0
- data/db/migrate/20160703184650_add_most_recent_to_manifestation_checkout_stat_transitions.rb +9 -0
- data/db/migrate/20160703184723_add_most_recent_to_manifestation_reserve_stat_transitions.rb +9 -0
- data/db/migrate/20160703184747_add_most_recent_to_user_checkout_stat_transitions.rb +9 -0
- data/db/migrate/20160703184805_add_most_recent_to_user_reserve_stat_transitions.rb +9 -0
- data/db/migrate/20160703190209_add_foreign_key_on_manifestation_id_to_reserve.rb +5 -0
- data/lib/enju_circulation/version.rb +1 -1
- data/lib/enju_circulation.rb +0 -20
- data/lib/generators/enju_circulation/setup/setup_generator.rb +16 -4
- data/lib/tasks/enju_circulation_tasks.rake +1 -1
- data/spec/controllers/carrier_type_has_checkout_types_controller_spec.rb +13 -13
- data/spec/controllers/checked_items_controller_spec.rb +6 -6
- data/spec/controllers/checkins_controller_spec.rb +6 -6
- data/spec/controllers/checkout_types_controller_spec.rb +11 -11
- data/spec/controllers/checkouts_controller_spec.rb +72 -71
- data/spec/controllers/circulation_statuses_controller_spec.rb +12 -12
- data/spec/controllers/item_has_use_restrictions_controller_spec.rb +11 -11
- data/spec/controllers/lending_policies_controller_spec.rb +14 -14
- data/spec/controllers/manifestation_checkout_stats_controller_spec.rb +6 -6
- data/spec/controllers/manifestation_reserve_stats_controller_spec.rb +6 -6
- data/spec/controllers/reserves_controller_spec.rb +5 -5
- data/spec/controllers/use_restrictions_controller_spec.rb +14 -14
- data/spec/controllers/user_checkout_stats_controller_spec.rb +8 -8
- data/spec/controllers/user_group_has_checkout_types_controller_spec.rb +11 -11
- data/spec/controllers/user_reserve_stats_controller_spec.rb +8 -8
- data/spec/dummy/app/assets/javascripts/application.js +1 -0
- data/spec/dummy/app/controllers/application_controller.rb +8 -4
- data/spec/dummy/app/models/user.rb +3 -5
- data/spec/dummy/config/application.rb +6 -37
- 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 +19 -14
- data/spec/dummy/config/initializers/enju_leaf.rb +5 -0
- data/spec/dummy/db/migrate/20150924115059_create_withdraws.rb +13 -0
- data/spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb +13 -0
- data/spec/dummy/db/migrate/20151213072705_add_footer_banner_to_library_group.rb +9 -0
- data/spec/dummy/db/schema.rb +30 -2
- data/spec/fixtures/profiles.yml +1 -1
- data/spec/models/manifestation_checkout_stat_spec.rb +3 -4
- data/spec/models/manifestation_reserve_stat_spec.rb +1 -1
- data/spec/models/user_checkout_stat_spec.rb +1 -1
- data/spec/models/user_reserve_stat_spec.rb +1 -1
- data/spec/support/devise.rb +2 -2
- data/spec/views/checkout_types/index.html.erb_spec.rb +1 -0
- data/spec/views/checkout_types/show.html.erb_spec.rb +1 -0
- data/spec/views/checkouts/index.html.erb_spec.rb +1 -3
- data/spec/views/checkouts/show.html.erb_spec.rb +5 -4
- data/spec/views/profiles/show.html.erb_spec.rb +2 -1
- data/spec/views/reserves/index.html.erb_spec.rb +3 -0
- data/spec/views/use_restrictions/index.html.erb_spec.rb +1 -0
- data/spec/views/use_restrictions/show.html.erb_spec.rb +1 -0
- metadata +147 -38
- data/app/models/enju_circulation/ability.rb +0 -114
- data/app/views/circulation_statuses/show.mobile.erb +0 -24
- data/app/workers/manifestation_checkout_stat_queue.rb +0 -7
- data/app/workers/manifestation_reserve_stat_queue.rb +0 -7
- data/app/workers/user_checkout_stat_queue.rb +0 -7
- data/app/workers/user_reserve_stat_queue.rb +0 -7
- data/lib/enju_circulation/accept.rb +0 -23
- data/lib/enju_circulation/basket.rb +0 -37
- data/lib/enju_circulation/carrier_type.rb +0 -15
- data/lib/enju_circulation/controller.rb +0 -21
- data/lib/enju_circulation/item.rb +0 -166
- data/lib/enju_circulation/manifestation.rb +0 -84
- data/lib/enju_circulation/profile.rb +0 -23
- data/lib/enju_circulation/user.rb +0 -61
- data/lib/enju_circulation/user_group.rb +0 -21
- data/lib/enju_circulation/withdraw.rb +0 -23
- data/spec/dummy/app/models/ability.rb +0 -111
- data/spec/dummy/app/models/local_agent.rb +0 -13
- data/spec/dummy/config/application.yml +0 -42
@@ -37,7 +37,7 @@ describe ItemHasUseRestrictionsController do
|
|
37
37
|
|
38
38
|
it "assigns all item_has_use_restrictions as @item_has_use_restrictions" do
|
39
39
|
get :index
|
40
|
-
assigns(:item_has_use_restrictions).should
|
40
|
+
assigns(:item_has_use_restrictions).should be_nil
|
41
41
|
response.should be_forbidden
|
42
42
|
end
|
43
43
|
end
|
@@ -45,7 +45,7 @@ describe ItemHasUseRestrictionsController do
|
|
45
45
|
describe "When not logged in" do
|
46
46
|
it "assigns all item_has_use_restrictions as @item_has_use_restrictions" do
|
47
47
|
get :index
|
48
|
-
assigns(:item_has_use_restrictions).should
|
48
|
+
assigns(:item_has_use_restrictions).should be_nil
|
49
49
|
response.should redirect_to(new_user_session_url)
|
50
50
|
end
|
51
51
|
end
|
@@ -107,7 +107,7 @@ describe ItemHasUseRestrictionsController do
|
|
107
107
|
|
108
108
|
it "should not assign the requested item_has_use_restriction as @item_has_use_restriction" do
|
109
109
|
get :new
|
110
|
-
assigns(:item_has_use_restriction).
|
110
|
+
assigns(:item_has_use_restriction).should be_nil
|
111
111
|
response.should be_forbidden
|
112
112
|
end
|
113
113
|
end
|
@@ -117,7 +117,7 @@ describe ItemHasUseRestrictionsController do
|
|
117
117
|
|
118
118
|
it "should not assign the requested item_has_use_restriction as @item_has_use_restriction" do
|
119
119
|
get :new
|
120
|
-
assigns(:item_has_use_restriction).
|
120
|
+
assigns(:item_has_use_restriction).should be_nil
|
121
121
|
response.should be_forbidden
|
122
122
|
end
|
123
123
|
end
|
@@ -125,7 +125,7 @@ describe ItemHasUseRestrictionsController do
|
|
125
125
|
describe "When not logged in" do
|
126
126
|
it "should not assign the requested item_has_use_restriction as @item_has_use_restriction" do
|
127
127
|
get :new
|
128
|
-
assigns(:item_has_use_restriction).
|
128
|
+
assigns(:item_has_use_restriction).should be_nil
|
129
129
|
response.should redirect_to(new_user_session_url)
|
130
130
|
end
|
131
131
|
end
|
@@ -211,7 +211,7 @@ describe ItemHasUseRestrictionsController do
|
|
211
211
|
describe "with valid params" do
|
212
212
|
it "assigns a newly created item_has_use_restriction as @item_has_use_restriction" do
|
213
213
|
post :create, :item_has_use_restriction => @attrs
|
214
|
-
assigns(:item_has_use_restriction).should
|
214
|
+
assigns(:item_has_use_restriction).should be_nil
|
215
215
|
end
|
216
216
|
|
217
217
|
it "should be forbidden" do
|
@@ -223,7 +223,7 @@ describe ItemHasUseRestrictionsController do
|
|
223
223
|
describe "with invalid params" do
|
224
224
|
it "assigns a newly created but unsaved item_has_use_restriction as @item_has_use_restriction" do
|
225
225
|
post :create, :item_has_use_restriction => @invalid_attrs
|
226
|
-
assigns(:item_has_use_restriction).
|
226
|
+
assigns(:item_has_use_restriction).should be_nil
|
227
227
|
end
|
228
228
|
|
229
229
|
it "should be forbidden" do
|
@@ -239,7 +239,7 @@ describe ItemHasUseRestrictionsController do
|
|
239
239
|
describe "with valid params" do
|
240
240
|
it "assigns a newly created item_has_use_restriction as @item_has_use_restriction" do
|
241
241
|
post :create, :item_has_use_restriction => @attrs
|
242
|
-
assigns(:item_has_use_restriction).should
|
242
|
+
assigns(:item_has_use_restriction).should be_nil
|
243
243
|
end
|
244
244
|
|
245
245
|
it "should be forbidden" do
|
@@ -251,7 +251,7 @@ describe ItemHasUseRestrictionsController do
|
|
251
251
|
describe "with invalid params" do
|
252
252
|
it "assigns a newly created but unsaved item_has_use_restriction as @item_has_use_restriction" do
|
253
253
|
post :create, :item_has_use_restriction => @invalid_attrs
|
254
|
-
assigns(:item_has_use_restriction).
|
254
|
+
assigns(:item_has_use_restriction).should be_nil
|
255
255
|
end
|
256
256
|
|
257
257
|
it "should be forbidden" do
|
@@ -265,7 +265,7 @@ describe ItemHasUseRestrictionsController do
|
|
265
265
|
describe "with valid params" do
|
266
266
|
it "assigns a newly created item_has_use_restriction as @item_has_use_restriction" do
|
267
267
|
post :create, :item_has_use_restriction => @attrs
|
268
|
-
assigns(:item_has_use_restriction).should
|
268
|
+
assigns(:item_has_use_restriction).should be_nil
|
269
269
|
end
|
270
270
|
|
271
271
|
it "should be forbidden" do
|
@@ -277,7 +277,7 @@ describe ItemHasUseRestrictionsController do
|
|
277
277
|
describe "with invalid params" do
|
278
278
|
it "assigns a newly created but unsaved item_has_use_restriction as @item_has_use_restriction" do
|
279
279
|
post :create, :item_has_use_restriction => @invalid_attrs
|
280
|
-
assigns(:item_has_use_restriction).
|
280
|
+
assigns(:item_has_use_restriction).should be_nil
|
281
281
|
end
|
282
282
|
|
283
283
|
it "should be forbidden" do
|
@@ -37,14 +37,14 @@ describe LendingPoliciesController do
|
|
37
37
|
|
38
38
|
it "assigns empty as @lending_policies" do
|
39
39
|
get :index
|
40
|
-
assigns(:lending_policies).should
|
40
|
+
assigns(:lending_policies).should be_nil
|
41
41
|
end
|
42
42
|
end
|
43
43
|
|
44
44
|
describe "When not logged in" do
|
45
45
|
it "assigns empty lending_policies as @lending_policies" do
|
46
46
|
get :index
|
47
|
-
assigns(:lending_policies).should
|
47
|
+
assigns(:lending_policies).should be_nil
|
48
48
|
end
|
49
49
|
end
|
50
50
|
end
|
@@ -99,7 +99,7 @@ describe LendingPoliciesController do
|
|
99
99
|
|
100
100
|
it "assigns the requested lending_policy as @lending_policy" do
|
101
101
|
get :new
|
102
|
-
assigns(:lending_policy).
|
102
|
+
assigns(:lending_policy).should be_nil
|
103
103
|
response.should be_forbidden
|
104
104
|
end
|
105
105
|
end
|
@@ -109,7 +109,7 @@ describe LendingPoliciesController do
|
|
109
109
|
|
110
110
|
it "should not assign the requested lending_policy as @lending_policy" do
|
111
111
|
get :new
|
112
|
-
assigns(:lending_policy).
|
112
|
+
assigns(:lending_policy).should be_nil
|
113
113
|
response.should be_forbidden
|
114
114
|
end
|
115
115
|
end
|
@@ -119,7 +119,7 @@ describe LendingPoliciesController do
|
|
119
119
|
|
120
120
|
it "should not assign the requested lending_policy as @lending_policy" do
|
121
121
|
get :new
|
122
|
-
assigns(:lending_policy).
|
122
|
+
assigns(:lending_policy).should be_nil
|
123
123
|
response.should be_forbidden
|
124
124
|
end
|
125
125
|
end
|
@@ -127,7 +127,7 @@ describe LendingPoliciesController do
|
|
127
127
|
describe "When not logged in" do
|
128
128
|
it "should not assign the requested lending_policy as @lending_policy" do
|
129
129
|
get :new
|
130
|
-
assigns(:lending_policy).
|
130
|
+
assigns(:lending_policy).should be_nil
|
131
131
|
response.should redirect_to(new_user_session_url)
|
132
132
|
end
|
133
133
|
end
|
@@ -185,7 +185,7 @@ describe LendingPoliciesController do
|
|
185
185
|
describe "with valid params" do
|
186
186
|
it "assigns a newly created lending_policy as @lending_policy" do
|
187
187
|
post :create, :lending_policy => @attrs
|
188
|
-
assigns(:lending_policy).should
|
188
|
+
assigns(:lending_policy).should be_nil
|
189
189
|
end
|
190
190
|
|
191
191
|
it "should be forbidden" do
|
@@ -197,7 +197,7 @@ describe LendingPoliciesController do
|
|
197
197
|
describe "with invalid params" do
|
198
198
|
it "assigns a newly created but unsaved lending_policy as @lending_policy" do
|
199
199
|
post :create, :lending_policy => @invalid_attrs
|
200
|
-
assigns(:lending_policy).
|
200
|
+
assigns(:lending_policy).should be_nil
|
201
201
|
end
|
202
202
|
|
203
203
|
it "should be forbidden" do
|
@@ -213,7 +213,7 @@ describe LendingPoliciesController do
|
|
213
213
|
describe "with valid params" do
|
214
214
|
it "assigns a newly created lending_policy as @lending_policy" do
|
215
215
|
post :create, :lending_policy => @attrs
|
216
|
-
assigns(:lending_policy).should
|
216
|
+
assigns(:lending_policy).should be_nil
|
217
217
|
end
|
218
218
|
|
219
219
|
it "should be forbidden" do
|
@@ -225,7 +225,7 @@ describe LendingPoliciesController do
|
|
225
225
|
describe "with invalid params" do
|
226
226
|
it "assigns a newly created but unsaved lending_policy as @lending_policy" do
|
227
227
|
post :create, :lending_policy => @invalid_attrs
|
228
|
-
assigns(:lending_policy).
|
228
|
+
assigns(:lending_policy).should be_nil
|
229
229
|
end
|
230
230
|
|
231
231
|
it "should be forbidden" do
|
@@ -241,7 +241,7 @@ describe LendingPoliciesController do
|
|
241
241
|
describe "with valid params" do
|
242
242
|
it "assigns a newly created lending_policy as @lending_policy" do
|
243
243
|
post :create, :lending_policy => @attrs
|
244
|
-
assigns(:lending_policy).should
|
244
|
+
assigns(:lending_policy).should be_nil
|
245
245
|
end
|
246
246
|
|
247
247
|
it "should be forbidden" do
|
@@ -253,7 +253,7 @@ describe LendingPoliciesController do
|
|
253
253
|
describe "with invalid params" do
|
254
254
|
it "assigns a newly created but unsaved lending_policy as @lending_policy" do
|
255
255
|
post :create, :lending_policy => @invalid_attrs
|
256
|
-
assigns(:lending_policy).
|
256
|
+
assigns(:lending_policy).should be_nil
|
257
257
|
end
|
258
258
|
|
259
259
|
it "should be forbidden" do
|
@@ -267,7 +267,7 @@ describe LendingPoliciesController do
|
|
267
267
|
describe "with valid params" do
|
268
268
|
it "assigns a newly created lending_policy as @lending_policy" do
|
269
269
|
post :create, :lending_policy => @attrs
|
270
|
-
assigns(:lending_policy).should
|
270
|
+
assigns(:lending_policy).should be_nil
|
271
271
|
end
|
272
272
|
|
273
273
|
it "should be forbidden" do
|
@@ -279,7 +279,7 @@ describe LendingPoliciesController do
|
|
279
279
|
describe "with invalid params" do
|
280
280
|
it "assigns a newly created but unsaved lending_policy as @lending_policy" do
|
281
281
|
post :create, :lending_policy => @invalid_attrs
|
282
|
-
assigns(:lending_policy).
|
282
|
+
assigns(:lending_policy).should be_nil
|
283
283
|
end
|
284
284
|
|
285
285
|
it "should be forbidden" do
|
@@ -107,7 +107,7 @@ describe ManifestationCheckoutStatsController do
|
|
107
107
|
|
108
108
|
it "should not assign the requested manifestation_checkout_stat as @manifestation_checkout_stat" do
|
109
109
|
get :new
|
110
|
-
assigns(:manifestation_checkout_stat).
|
110
|
+
assigns(:manifestation_checkout_stat).should be_nil
|
111
111
|
response.should be_forbidden
|
112
112
|
end
|
113
113
|
end
|
@@ -115,7 +115,7 @@ describe ManifestationCheckoutStatsController do
|
|
115
115
|
describe "When not logged in" do
|
116
116
|
it "should not assign the requested manifestation_checkout_stat as @manifestation_checkout_stat" do
|
117
117
|
get :new
|
118
|
-
assigns(:manifestation_checkout_stat).
|
118
|
+
assigns(:manifestation_checkout_stat).should be_nil
|
119
119
|
response.should redirect_to(new_user_session_url)
|
120
120
|
end
|
121
121
|
end
|
@@ -231,7 +231,7 @@ describe ManifestationCheckoutStatsController do
|
|
231
231
|
describe "with valid params" do
|
232
232
|
it "assigns a newly created manifestation_checkout_stat as @manifestation_checkout_stat" do
|
233
233
|
post :create, :manifestation_checkout_stat => @attrs
|
234
|
-
assigns(:manifestation_checkout_stat).should
|
234
|
+
assigns(:manifestation_checkout_stat).should be_nil
|
235
235
|
end
|
236
236
|
|
237
237
|
it "should be forbidden" do
|
@@ -243,7 +243,7 @@ describe ManifestationCheckoutStatsController do
|
|
243
243
|
describe "with invalid params" do
|
244
244
|
it "assigns a newly created but unsaved manifestation_checkout_stat as @manifestation_checkout_stat" do
|
245
245
|
post :create, :manifestation_checkout_stat => @invalid_attrs
|
246
|
-
assigns(:manifestation_checkout_stat).
|
246
|
+
assigns(:manifestation_checkout_stat).should be_nil
|
247
247
|
end
|
248
248
|
|
249
249
|
it "should be forbidden" do
|
@@ -257,7 +257,7 @@ describe ManifestationCheckoutStatsController do
|
|
257
257
|
describe "with valid params" do
|
258
258
|
it "assigns a newly created manifestation_checkout_stat as @manifestation_checkout_stat" do
|
259
259
|
post :create, :manifestation_checkout_stat => @attrs
|
260
|
-
assigns(:manifestation_checkout_stat).should
|
260
|
+
assigns(:manifestation_checkout_stat).should be_nil
|
261
261
|
end
|
262
262
|
|
263
263
|
it "should be forbidden" do
|
@@ -269,7 +269,7 @@ describe ManifestationCheckoutStatsController do
|
|
269
269
|
describe "with invalid params" do
|
270
270
|
it "assigns a newly created but unsaved manifestation_checkout_stat as @manifestation_checkout_stat" do
|
271
271
|
post :create, :manifestation_checkout_stat => @invalid_attrs
|
272
|
-
assigns(:manifestation_checkout_stat).
|
272
|
+
assigns(:manifestation_checkout_stat).should be_nil
|
273
273
|
end
|
274
274
|
|
275
275
|
it "should be forbidden" do
|
@@ -107,7 +107,7 @@ describe ManifestationReserveStatsController do
|
|
107
107
|
|
108
108
|
it "should not assign the requested manifestation_reserve_stat as @manifestation_reserve_stat" do
|
109
109
|
get :new
|
110
|
-
assigns(:manifestation_reserve_stat).
|
110
|
+
assigns(:manifestation_reserve_stat).should be_nil
|
111
111
|
response.should be_forbidden
|
112
112
|
end
|
113
113
|
end
|
@@ -115,7 +115,7 @@ describe ManifestationReserveStatsController do
|
|
115
115
|
describe "When not logged in" do
|
116
116
|
it "should not assign the requested manifestation_reserve_stat as @manifestation_reserve_stat" do
|
117
117
|
get :new
|
118
|
-
assigns(:manifestation_reserve_stat).
|
118
|
+
assigns(:manifestation_reserve_stat).should be_nil
|
119
119
|
response.should redirect_to(new_user_session_url)
|
120
120
|
end
|
121
121
|
end
|
@@ -229,7 +229,7 @@ describe ManifestationReserveStatsController do
|
|
229
229
|
describe "with valid params" do
|
230
230
|
it "assigns a newly created manifestation_reserve_stat as @manifestation_reserve_stat" do
|
231
231
|
post :create, :manifestation_reserve_stat => @attrs
|
232
|
-
assigns(:manifestation_reserve_stat).should
|
232
|
+
assigns(:manifestation_reserve_stat).should be_nil
|
233
233
|
end
|
234
234
|
|
235
235
|
it "should be forbidden" do
|
@@ -241,7 +241,7 @@ describe ManifestationReserveStatsController do
|
|
241
241
|
describe "with invalid params" do
|
242
242
|
it "assigns a newly created but unsaved manifestation_reserve_stat as @manifestation_reserve_stat" do
|
243
243
|
post :create, :manifestation_reserve_stat => @invalid_attrs
|
244
|
-
assigns(:manifestation_reserve_stat).
|
244
|
+
assigns(:manifestation_reserve_stat).should be_nil
|
245
245
|
end
|
246
246
|
|
247
247
|
it "should be forbidden" do
|
@@ -255,7 +255,7 @@ describe ManifestationReserveStatsController do
|
|
255
255
|
describe "with valid params" do
|
256
256
|
it "assigns a newly created manifestation_reserve_stat as @manifestation_reserve_stat" do
|
257
257
|
post :create, :manifestation_reserve_stat => @attrs
|
258
|
-
assigns(:manifestation_reserve_stat).should
|
258
|
+
assigns(:manifestation_reserve_stat).should be_nil
|
259
259
|
end
|
260
260
|
|
261
261
|
it "should be forbidden" do
|
@@ -267,7 +267,7 @@ describe ManifestationReserveStatsController do
|
|
267
267
|
describe "with invalid params" do
|
268
268
|
it "assigns a newly created but unsaved manifestation_reserve_stat as @manifestation_reserve_stat" do
|
269
269
|
post :create, :manifestation_reserve_stat => @invalid_attrs
|
270
|
-
assigns(:manifestation_reserve_stat).
|
270
|
+
assigns(:manifestation_reserve_stat).should be_nil
|
271
271
|
end
|
272
272
|
|
273
273
|
it "should be forbidden" do
|
@@ -269,7 +269,7 @@ describe ReservesController do
|
|
269
269
|
describe "When not logged in" do
|
270
270
|
it "should not assign the requested reserve as @reserve" do
|
271
271
|
get :new
|
272
|
-
assigns(:reserve).
|
272
|
+
assigns(:reserve).should be_nil
|
273
273
|
response.should redirect_to(new_user_session_url)
|
274
274
|
end
|
275
275
|
end
|
@@ -485,7 +485,7 @@ describe ReservesController do
|
|
485
485
|
describe "with valid params" do
|
486
486
|
it "assigns a newly created reserve as @reserve" do
|
487
487
|
post :create, :reserve => @attrs
|
488
|
-
assigns(:reserve).
|
488
|
+
assigns(:reserve).should be_nil
|
489
489
|
end
|
490
490
|
|
491
491
|
it "redirects to the login page" do
|
@@ -497,12 +497,12 @@ describe ReservesController do
|
|
497
497
|
describe "with invalid params" do
|
498
498
|
it "assigns a newly created but unsaved reserve as @reserve" do
|
499
499
|
post :create, :reserve => @invalid_attrs
|
500
|
-
assigns(:reserve).
|
500
|
+
assigns(:reserve).should be_nil
|
501
501
|
end
|
502
502
|
|
503
503
|
it "redirects to the login page" do
|
504
504
|
post :create, :reserve => @invalid_attrs
|
505
|
-
assigns(:reserve).
|
505
|
+
assigns(:reserve).should be_nil
|
506
506
|
response.should redirect_to new_user_session_url
|
507
507
|
end
|
508
508
|
end
|
@@ -648,7 +648,7 @@ describe ReservesController do
|
|
648
648
|
end
|
649
649
|
end
|
650
650
|
|
651
|
-
it "should
|
651
|
+
it "should cancel my reservation" do
|
652
652
|
old_message_requests_count = MessageRequest.count
|
653
653
|
put :update, :id => 3, :mode => 'cancel'
|
654
654
|
flash[:notice].should eq I18n.t('reserve.reservation_was_canceled')
|
@@ -37,7 +37,7 @@ describe UseRestrictionsController do
|
|
37
37
|
|
38
38
|
it "should be forbidden" do
|
39
39
|
get :index
|
40
|
-
assigns(:use_restrictions).should
|
40
|
+
assigns(:use_restrictions).should be_nil
|
41
41
|
response.should be_forbidden
|
42
42
|
end
|
43
43
|
end
|
@@ -45,7 +45,7 @@ describe UseRestrictionsController do
|
|
45
45
|
describe "When not logged in" do
|
46
46
|
it "assigns all use_restrictions as @use_restrictions" do
|
47
47
|
get :index
|
48
|
-
assigns(:use_restrictions).should
|
48
|
+
assigns(:use_restrictions).should be_nil
|
49
49
|
response.should redirect_to(new_user_session_url)
|
50
50
|
end
|
51
51
|
end
|
@@ -97,7 +97,7 @@ describe UseRestrictionsController do
|
|
97
97
|
|
98
98
|
it "should be forbidden" do
|
99
99
|
get :new
|
100
|
-
assigns(:use_restriction).
|
100
|
+
assigns(:use_restriction).should be_nil
|
101
101
|
response.should be_forbidden
|
102
102
|
end
|
103
103
|
end
|
@@ -107,7 +107,7 @@ describe UseRestrictionsController do
|
|
107
107
|
|
108
108
|
it "should be forbidden" do
|
109
109
|
get :new
|
110
|
-
assigns(:use_restriction).
|
110
|
+
assigns(:use_restriction).should be_nil
|
111
111
|
response.should be_forbidden
|
112
112
|
end
|
113
113
|
end
|
@@ -117,7 +117,7 @@ describe UseRestrictionsController do
|
|
117
117
|
|
118
118
|
it "should be forbidden" do
|
119
119
|
get :new
|
120
|
-
assigns(:use_restriction).
|
120
|
+
assigns(:use_restriction).should be_nil
|
121
121
|
response.should be_forbidden
|
122
122
|
end
|
123
123
|
end
|
@@ -125,7 +125,7 @@ describe UseRestrictionsController do
|
|
125
125
|
describe "When not logged in" do
|
126
126
|
it "should be redirected" do
|
127
127
|
get :new
|
128
|
-
assigns(:use_restriction).
|
128
|
+
assigns(:use_restriction).should be_nil
|
129
129
|
response.should redirect_to(new_user_session_url)
|
130
130
|
end
|
131
131
|
end
|
@@ -183,7 +183,7 @@ describe UseRestrictionsController do
|
|
183
183
|
describe "with valid params" do
|
184
184
|
it "assigns a newly created use_restriction as @use_restriction" do
|
185
185
|
post :create, :use_restriction => @attrs
|
186
|
-
assigns(:use_restriction).should
|
186
|
+
assigns(:use_restriction).should be_nil
|
187
187
|
end
|
188
188
|
|
189
189
|
it "redirects to the created patron" do
|
@@ -195,7 +195,7 @@ describe UseRestrictionsController do
|
|
195
195
|
describe "with invalid params" do
|
196
196
|
it "assigns a newly created but unsaved use_restriction as @use_restriction" do
|
197
197
|
post :create, :use_restriction => @invalid_attrs
|
198
|
-
assigns(:use_restriction).
|
198
|
+
assigns(:use_restriction).should be_nil
|
199
199
|
end
|
200
200
|
|
201
201
|
it "should be successful" do
|
@@ -211,7 +211,7 @@ describe UseRestrictionsController do
|
|
211
211
|
describe "with valid params" do
|
212
212
|
it "assigns a newly created use_restriction as @use_restriction" do
|
213
213
|
post :create, :use_restriction => @attrs
|
214
|
-
assigns(:use_restriction).should
|
214
|
+
assigns(:use_restriction).should be_nil
|
215
215
|
end
|
216
216
|
|
217
217
|
it "should be forbidden" do
|
@@ -223,7 +223,7 @@ describe UseRestrictionsController do
|
|
223
223
|
describe "with invalid params" do
|
224
224
|
it "assigns a newly created but unsaved use_restriction as @use_restriction" do
|
225
225
|
post :create, :use_restriction => @invalid_attrs
|
226
|
-
assigns(:use_restriction).
|
226
|
+
assigns(:use_restriction).should be_nil
|
227
227
|
end
|
228
228
|
|
229
229
|
it "should be forbidden" do
|
@@ -239,7 +239,7 @@ describe UseRestrictionsController do
|
|
239
239
|
describe "with valid params" do
|
240
240
|
it "assigns a newly created use_restriction as @use_restriction" do
|
241
241
|
post :create, :use_restriction => @attrs
|
242
|
-
assigns(:use_restriction).should
|
242
|
+
assigns(:use_restriction).should be_nil
|
243
243
|
end
|
244
244
|
|
245
245
|
it "should be forbidden" do
|
@@ -251,7 +251,7 @@ describe UseRestrictionsController do
|
|
251
251
|
describe "with invalid params" do
|
252
252
|
it "assigns a newly created but unsaved use_restriction as @use_restriction" do
|
253
253
|
post :create, :use_restriction => @invalid_attrs
|
254
|
-
assigns(:use_restriction).
|
254
|
+
assigns(:use_restriction).should be_nil
|
255
255
|
end
|
256
256
|
|
257
257
|
it "should be forbidden" do
|
@@ -265,7 +265,7 @@ describe UseRestrictionsController do
|
|
265
265
|
describe "with valid params" do
|
266
266
|
it "assigns a newly created use_restriction as @use_restriction" do
|
267
267
|
post :create, :use_restriction => @attrs
|
268
|
-
assigns(:use_restriction).should
|
268
|
+
assigns(:use_restriction).should be_nil
|
269
269
|
end
|
270
270
|
|
271
271
|
it "should be forbidden" do
|
@@ -277,7 +277,7 @@ describe UseRestrictionsController do
|
|
277
277
|
describe "with invalid params" do
|
278
278
|
it "assigns a newly created but unsaved use_restriction as @use_restriction" do
|
279
279
|
post :create, :use_restriction => @invalid_attrs
|
280
|
-
assigns(:use_restriction).
|
280
|
+
assigns(:use_restriction).should be_nil
|
281
281
|
end
|
282
282
|
|
283
283
|
it "should be forbidden" do
|
@@ -31,7 +31,7 @@ describe UserCheckoutStatsController do
|
|
31
31
|
|
32
32
|
it "assigns all user_checkout_stats as @user_checkout_stats" do
|
33
33
|
get :index
|
34
|
-
assigns(:user_checkout_stats).should
|
34
|
+
assigns(:user_checkout_stats).should be_nil
|
35
35
|
response.should be_forbidden
|
36
36
|
end
|
37
37
|
end
|
@@ -39,7 +39,7 @@ describe UserCheckoutStatsController do
|
|
39
39
|
describe "When not logged in" do
|
40
40
|
it "should not assign user_checkout_stats as @user_checkout_stats" do
|
41
41
|
get :index
|
42
|
-
assigns(:user_checkout_stats).should
|
42
|
+
assigns(:user_checkout_stats).should be_nil
|
43
43
|
response.should redirect_to(new_user_session_url)
|
44
44
|
end
|
45
45
|
end
|
@@ -111,7 +111,7 @@ describe UserCheckoutStatsController do
|
|
111
111
|
|
112
112
|
it "should not assign the requested user_checkout_stat as @user_checkout_stat" do
|
113
113
|
get :new
|
114
|
-
assigns(:user_checkout_stat).
|
114
|
+
assigns(:user_checkout_stat).should be_nil
|
115
115
|
response.should be_forbidden
|
116
116
|
end
|
117
117
|
end
|
@@ -119,7 +119,7 @@ describe UserCheckoutStatsController do
|
|
119
119
|
describe "When not logged in" do
|
120
120
|
it "should not assign the requested user_checkout_stat as @user_checkout_stat" do
|
121
121
|
get :new
|
122
|
-
assigns(:user_checkout_stat).
|
122
|
+
assigns(:user_checkout_stat).should be_nil
|
123
123
|
response.should redirect_to(new_user_session_url)
|
124
124
|
end
|
125
125
|
end
|
@@ -233,7 +233,7 @@ describe UserCheckoutStatsController do
|
|
233
233
|
describe "with valid params" do
|
234
234
|
it "assigns a newly created user_checkout_stat as @user_checkout_stat" do
|
235
235
|
post :create, :user_checkout_stat => @attrs
|
236
|
-
assigns(:user_checkout_stat).should
|
236
|
+
assigns(:user_checkout_stat).should be_nil
|
237
237
|
end
|
238
238
|
|
239
239
|
it "should be forbidden" do
|
@@ -245,7 +245,7 @@ describe UserCheckoutStatsController do
|
|
245
245
|
describe "with invalid params" do
|
246
246
|
it "assigns a newly created but unsaved user_checkout_stat as @user_checkout_stat" do
|
247
247
|
post :create, :user_checkout_stat => @invalid_attrs
|
248
|
-
assigns(:user_checkout_stat).
|
248
|
+
assigns(:user_checkout_stat).should be_nil
|
249
249
|
end
|
250
250
|
|
251
251
|
it "should be forbidden" do
|
@@ -259,7 +259,7 @@ describe UserCheckoutStatsController do
|
|
259
259
|
describe "with valid params" do
|
260
260
|
it "assigns a newly created user_checkout_stat as @user_checkout_stat" do
|
261
261
|
post :create, :user_checkout_stat => @attrs
|
262
|
-
assigns(:user_checkout_stat).should
|
262
|
+
assigns(:user_checkout_stat).should be_nil
|
263
263
|
end
|
264
264
|
|
265
265
|
it "should be forbidden" do
|
@@ -271,7 +271,7 @@ describe UserCheckoutStatsController do
|
|
271
271
|
describe "with invalid params" do
|
272
272
|
it "assigns a newly created but unsaved user_checkout_stat as @user_checkout_stat" do
|
273
273
|
post :create, :user_checkout_stat => @invalid_attrs
|
274
|
-
assigns(:user_checkout_stat).
|
274
|
+
assigns(:user_checkout_stat).should be_nil
|
275
275
|
end
|
276
276
|
|
277
277
|
it "should be forbidden" do
|
@@ -27,7 +27,7 @@ describe UserGroupHasCheckoutTypesController do
|
|
27
27
|
|
28
28
|
it "assigns all user_group_has_checkout_types as @user_group_has_checkout_types" do
|
29
29
|
get :index
|
30
|
-
assigns(:user_group_has_checkout_types).should
|
30
|
+
assigns(:user_group_has_checkout_types).should be_nil
|
31
31
|
response.should be_forbidden
|
32
32
|
end
|
33
33
|
end
|
@@ -35,7 +35,7 @@ describe UserGroupHasCheckoutTypesController do
|
|
35
35
|
describe "When not logged in" do
|
36
36
|
it "assigns all user_group_has_checkout_types as @user_group_has_checkout_types" do
|
37
37
|
get :index
|
38
|
-
assigns(:user_group_has_checkout_types).should
|
38
|
+
assigns(:user_group_has_checkout_types).should be_nil
|
39
39
|
response.should redirect_to(new_user_session_url)
|
40
40
|
end
|
41
41
|
end
|
@@ -97,7 +97,7 @@ describe UserGroupHasCheckoutTypesController do
|
|
97
97
|
|
98
98
|
it "should not assign the requested user_group_has_checkout_type as @user_group_has_checkout_type" do
|
99
99
|
get :new
|
100
|
-
assigns(:user_group_has_checkout_type).
|
100
|
+
assigns(:user_group_has_checkout_type).should be_nil
|
101
101
|
response.should be_forbidden
|
102
102
|
end
|
103
103
|
end
|
@@ -107,7 +107,7 @@ describe UserGroupHasCheckoutTypesController do
|
|
107
107
|
|
108
108
|
it "should not assign the requested user_group_has_checkout_type as @user_group_has_checkout_type" do
|
109
109
|
get :new
|
110
|
-
assigns(:user_group_has_checkout_type).
|
110
|
+
assigns(:user_group_has_checkout_type).should be_nil
|
111
111
|
response.should be_forbidden
|
112
112
|
end
|
113
113
|
end
|
@@ -115,7 +115,7 @@ describe UserGroupHasCheckoutTypesController do
|
|
115
115
|
describe "When not logged in" do
|
116
116
|
it "should not assign the requested user_group_has_checkout_type as @user_group_has_checkout_type" do
|
117
117
|
get :new
|
118
|
-
assigns(:user_group_has_checkout_type).
|
118
|
+
assigns(:user_group_has_checkout_type).should be_nil
|
119
119
|
response.should redirect_to(new_user_session_url)
|
120
120
|
end
|
121
121
|
end
|
@@ -201,7 +201,7 @@ describe UserGroupHasCheckoutTypesController do
|
|
201
201
|
describe "with valid params" do
|
202
202
|
it "assigns a newly created user_group_has_checkout_type as @user_group_has_checkout_type" do
|
203
203
|
post :create, :user_group_has_checkout_type => @attrs
|
204
|
-
assigns(:user_group_has_checkout_type).should
|
204
|
+
assigns(:user_group_has_checkout_type).should be_nil
|
205
205
|
end
|
206
206
|
|
207
207
|
it "should be forbidden" do
|
@@ -213,7 +213,7 @@ describe UserGroupHasCheckoutTypesController do
|
|
213
213
|
describe "with invalid params" do
|
214
214
|
it "assigns a newly created but unsaved user_group_has_checkout_type as @user_group_has_checkout_type" do
|
215
215
|
post :create, :user_group_has_checkout_type => @invalid_attrs
|
216
|
-
assigns(:user_group_has_checkout_type).
|
216
|
+
assigns(:user_group_has_checkout_type).should be_nil
|
217
217
|
end
|
218
218
|
|
219
219
|
it "should be forbidden" do
|
@@ -229,7 +229,7 @@ describe UserGroupHasCheckoutTypesController do
|
|
229
229
|
describe "with valid params" do
|
230
230
|
it "assigns a newly created user_group_has_checkout_type as @user_group_has_checkout_type" do
|
231
231
|
post :create, :user_group_has_checkout_type => @attrs
|
232
|
-
assigns(:user_group_has_checkout_type).should
|
232
|
+
assigns(:user_group_has_checkout_type).should be_nil
|
233
233
|
end
|
234
234
|
|
235
235
|
it "should be forbidden" do
|
@@ -241,7 +241,7 @@ describe UserGroupHasCheckoutTypesController do
|
|
241
241
|
describe "with invalid params" do
|
242
242
|
it "assigns a newly created but unsaved user_group_has_checkout_type as @user_group_has_checkout_type" do
|
243
243
|
post :create, :user_group_has_checkout_type => @invalid_attrs
|
244
|
-
assigns(:user_group_has_checkout_type).
|
244
|
+
assigns(:user_group_has_checkout_type).should be_nil
|
245
245
|
end
|
246
246
|
|
247
247
|
it "should be forbidden" do
|
@@ -255,7 +255,7 @@ describe UserGroupHasCheckoutTypesController do
|
|
255
255
|
describe "with valid params" do
|
256
256
|
it "assigns a newly created user_group_has_checkout_type as @user_group_has_checkout_type" do
|
257
257
|
post :create, :user_group_has_checkout_type => @attrs
|
258
|
-
assigns(:user_group_has_checkout_type).should
|
258
|
+
assigns(:user_group_has_checkout_type).should be_nil
|
259
259
|
end
|
260
260
|
|
261
261
|
it "should be forbidden" do
|
@@ -267,7 +267,7 @@ describe UserGroupHasCheckoutTypesController do
|
|
267
267
|
describe "with invalid params" do
|
268
268
|
it "assigns a newly created but unsaved user_group_has_checkout_type as @user_group_has_checkout_type" do
|
269
269
|
post :create, :user_group_has_checkout_type => @invalid_attrs
|
270
|
-
assigns(:user_group_has_checkout_type).
|
270
|
+
assigns(:user_group_has_checkout_type).should be_nil
|
271
271
|
end
|
272
272
|
|
273
273
|
it "should be forbidden" do
|