enju_circulation 0.0.32 → 0.0.33

Sign up to get free protection for your applications and to get access to all the features.
@@ -130,6 +130,7 @@ class ReservesController < ApplicationController
130
130
  respond_to do |format|
131
131
  if @reserve.save
132
132
  @reserve.sm_request!
133
+ @reserve.send_message
133
134
 
134
135
  #format.html { redirect_to reserve_url(@reserve) }
135
136
  format.html { redirect_to @reserve, :notice => t('controller.successfully_created', :model => t('activerecord.models.reserve')) }
@@ -1,3 +1,3 @@
1
1
  module EnjuCirculation
2
- VERSION = "0.0.32"
2
+ VERSION = "0.0.33"
3
3
  end
@@ -409,6 +409,12 @@ describe ReservesController do
409
409
  response.should redirect_to(assigns(:reserve))
410
410
  assigns(:reserve).expired_at.should be_true
411
411
  end
412
+
413
+ it "should send accepted messages" do
414
+ old_count = Message.count
415
+ post :create, :reserve => @attrs, :user_id => users(:user1).username
416
+ Message.count.should eq old_count + 2
417
+ end
412
418
  end
413
419
 
414
420
  describe "with invalid params" do
Binary file
Binary file
@@ -62,6 +62,10 @@ describe Reserve do
62
62
  it "should expire all reservations" do
63
63
  assert Reserve.expire.should be_true
64
64
  end
65
+
66
+ it "should send accepted notification" do
67
+ assert Reserve.expire.should be_true
68
+ end
65
69
  end
66
70
 
67
71
  # == Schema Information
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.32
4
+ version: 0.0.33
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-04-30 00:00:00.000000000 Z
12
+ date: 2012-05-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails