enju_circulation 0.0.58 → 0.0.59

Sign up to get free protection for your applications and to get access to all the features.
@@ -13,7 +13,7 @@
13
13
  </td>
14
14
  <td><%= link_to checked_item.item.item_identifier, checked_item.item -%></td>
15
15
  <td><%= l(checked_item.due_date, :format => :only_date) -%></td>
16
- <td><%= link_to t('page.destroy'), checked_item, {:data => {:confirm => t('page.are_you_sure')}, :method => :delete -%></td>
16
+ <td><%= link_to t('page.destroy'), checked_item, :data => {:confirm => t('page.are_you_sure')}, :method => :delete -%></td>
17
17
  </tr>
18
18
  <%- end -%>
19
19
  </table>
@@ -1,3 +1,3 @@
1
1
  module EnjuCirculation
2
- VERSION = "0.0.58"
2
+ VERSION = "0.0.59"
3
3
  end
@@ -142,51 +142,6 @@ describe AcceptsController do
142
142
  end
143
143
  end
144
144
 
145
- describe "GET edit" do
146
- describe "When logged in as Administrator" do
147
- login_fixture_admin
148
-
149
- it "assigns the requested accept as @accept" do
150
- accept = FactoryGirl.create(:accept)
151
- get :edit, :id => accept.id
152
- assigns(:accept).should eq(accept)
153
- end
154
-
155
- it "should not edit missing accept" do
156
- get :edit, :id => 'missing'
157
- response.should be_missing
158
- end
159
- end
160
-
161
- describe "When logged in as Librarian" do
162
- login_fixture_librarian
163
-
164
- it "assigns the requested accept as @accept" do
165
- accept = FactoryGirl.create(:accept)
166
- get :edit, :id => accept.id
167
- assigns(:accept).should eq(accept)
168
- end
169
- end
170
-
171
- describe "When logged in as User" do
172
- login_fixture_user
173
-
174
- it "assigns the requested accept as @accept" do
175
- accept = FactoryGirl.create(:accept)
176
- get :edit, :id => accept.id
177
- response.should be_forbidden
178
- end
179
- end
180
-
181
- describe "When not logged in" do
182
- it "should not assign the requested accept as @accept" do
183
- accept = FactoryGirl.create(:accept)
184
- get :edit, :id => accept.id
185
- response.should redirect_to(new_user_session_url)
186
- end
187
- end
188
- end
189
-
190
145
  describe "POST create" do
191
146
  before(:each) do
192
147
  @attrs = {:item_identifier => '00003'}
@@ -286,123 +241,6 @@ describe AcceptsController do
286
241
  end
287
242
  end
288
243
 
289
- describe "PUT update" do
290
- before(:each) do
291
- @accept = FactoryGirl.create(:accept)
292
- @attrs = {:item_identifier => @accept.item.item_identifier, :librarian_id => FactoryGirl.create(:librarian).id}
293
- @invalid_attrs = {:item_id => ''}
294
- end
295
-
296
- describe "When logged in as Administrator" do
297
- login_fixture_admin
298
-
299
- describe "with valid params" do
300
- it "updates the requested accept" do
301
- put :update, :id => @accept.id, :accept => @attrs
302
- end
303
-
304
- it "assigns the requested accept as @accept" do
305
- put :update, :id => @accept.id, :accept => @attrs
306
- assigns(:accept).should eq(@accept)
307
- response.should redirect_to(@accept)
308
- end
309
- end
310
-
311
- describe "with invalid params" do
312
- it "assigns the requested accept as @accept" do
313
- put :update, :id => @accept.id, :accept => @invalid_attrs
314
- end
315
-
316
- it "re-renders the 'edit' template" do
317
- put :update, :id => @accept.id, :accept => @invalid_attrs
318
- response.should render_template("edit")
319
- end
320
-
321
- it "should not update accept without item_id" do
322
- put :update, :id => @accept.id, :accept => @attrs.merge(:item_id => nil)
323
- assigns(:accept).should_not be_valid
324
- response.should be_success
325
- end
326
- end
327
-
328
- it "should not update missing accept" do
329
- put :update, :id => 'missing', :accept => { }
330
- response.should be_missing
331
- end
332
- end
333
-
334
- describe "When logged in as Librarian" do
335
- login_fixture_librarian
336
-
337
- describe "with valid params" do
338
- it "updates the requested accept" do
339
- put :update, :id => @accept.id, :accept => @attrs
340
- end
341
-
342
- it "assigns the requested accept as @accept" do
343
- put :update, :id => @accept.id, :accept => @attrs
344
- assigns(:accept).should eq(@accept)
345
- response.should redirect_to(@accept)
346
- end
347
- end
348
-
349
- describe "with invalid params" do
350
- it "assigns the accept as @accept" do
351
- put :update, :id => @accept.id, :accept => @invalid_attrs
352
- assigns(:accept).should_not be_valid
353
- end
354
-
355
- it "re-renders the 'edit' template" do
356
- put :update, :id => @accept.id, :accept => @invalid_attrs
357
- response.should render_template("edit")
358
- end
359
- end
360
- end
361
-
362
- describe "When logged in as User" do
363
- login_fixture_user
364
-
365
- describe "with valid params" do
366
- it "updates the requested accept" do
367
- put :update, :id => @accept.id, :accept => @attrs
368
- end
369
-
370
- it "assigns the requested accept as @accept" do
371
- put :update, :id => @accept.id, :accept => @attrs
372
- assigns(:accept).should eq(@accept)
373
- response.should be_forbidden
374
- end
375
- end
376
-
377
- describe "with invalid params" do
378
- it "assigns the requested accept as @accept" do
379
- put :update, :id => @accept.id, :accept => @invalid_attrs
380
- response.should be_forbidden
381
- end
382
- end
383
- end
384
-
385
- describe "When not logged in" do
386
- describe "with valid params" do
387
- it "updates the requested accept" do
388
- put :update, :id => @accept.id, :accept => @attrs
389
- end
390
-
391
- it "should be forbidden" do
392
- put :update, :id => @accept.id, :accept => @attrs
393
- response.should redirect_to(new_user_session_url)
394
- end
395
- end
396
-
397
- describe "with invalid params" do
398
- it "assigns the requested accept as @accept" do
399
- put :update, :id => @accept.id, :accept => @invalid_attrs
400
- response.should redirect_to(new_user_session_url)
401
- end
402
- end
403
- end
404
- end
405
-
406
244
  describe "DELETE destroy" do
407
245
  before(:each) do
408
246
  @accept = FactoryGirl.create(:accept)
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enju_circulation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.58
4
+ version: 0.0.59
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-14 00:00:00.000000000 Z
12
+ date: 2012-06-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails