proposal 0.0.4 → 0.0.5

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.
@@ -190,9 +190,9 @@ class ProposalTest < ActiveSupport::TestCase
190
190
  proposal = User.propose.to email
191
191
 
192
192
  assert_equal true, proposal.remind?
193
- assert_equal true, proposal.notify_remind?
194
- assert_equal false, proposal.invite_remind?
195
- assert_equal :notify_remind, proposal.action
193
+ assert_equal true, proposal.invite_remind?
194
+ assert_equal false, proposal.notify_remind?
195
+ assert_equal :invite_remind, proposal.action
196
196
  end
197
197
 
198
198
  test "should have action remind for notify (existing user)" do
@@ -203,9 +203,9 @@ class ProposalTest < ActiveSupport::TestCase
203
203
  proposal = User.propose.to email
204
204
 
205
205
  assert_equal true, proposal.remind?
206
- assert_equal true, proposal.invite_remind?
207
- assert_equal false, proposal.notify_remind?
208
- assert_equal :invite_remind, proposal.action
206
+ assert_equal true, proposal.notify_remind?
207
+ assert_equal false, proposal.invite_remind?
208
+ assert_equal :notify_remind, proposal.action
209
209
  end
210
210
 
211
211
  test "should not return no action if accepted" do
@@ -216,13 +216,29 @@ class ProposalTest < ActiveSupport::TestCase
216
216
  assert_equal nil, proposal.action
217
217
  end
218
218
 
219
- test "should set reminded" do
219
+ test "should raise error if remind is not true" do
220
+ proposal = User.propose.to email
221
+ assert_raises(Proposal::RemindError) { proposal.reminded! }
222
+ end
223
+
224
+ test "should set reminded safe" do
225
+ user = User.create email: email
226
+ existing = User.propose.to email
227
+ existing.save!
228
+
229
+ proposal = User.propose.to email
230
+ assert_equal true, proposal.reminded
231
+ assert_equal true, proposal.reminded?
232
+ end
233
+
234
+ test "should set reminded bang" do
220
235
  user = User.create email: email
221
236
  existing = User.propose.to email
222
237
  existing.save!
223
238
 
224
239
  proposal = User.propose.to email
225
240
  assert_equal true, proposal.reminded!
241
+ assert_equal true, proposal.reminded?
226
242
  end
227
243
 
228
244
  test "should find and accept proposal" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: proposal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
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-11-08 00:00:00.000000000 Z
12
+ date: 2012-11-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -116,7 +116,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
116
116
  version: '0'
117
117
  segments:
118
118
  - 0
119
- hash: 2423557025523420523
119
+ hash: 1641669357242632493
120
120
  required_rubygems_version: !ruby/object:Gem::Requirement
121
121
  none: false
122
122
  requirements:
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
125
  version: '0'
126
126
  segments:
127
127
  - 0
128
- hash: 2423557025523420523
128
+ hash: 1641669357242632493
129
129
  requirements: []
130
130
  rubyforge_project:
131
131
  rubygems_version: 1.8.24