Commit 37f88f662b33d0d786e10b5f11e620605a17c1f9

Authored by Dhruv Kapadia
1 parent 43317f86

Make one test pass

Showing 1 changed file with 7 additions and 1 deletions   Show diff stats
spec/models/question_spec.rb
... ... @@ -205,10 +205,16 @@ describe Question do
205 205  
206 206 @a = user.record_appearance(visitor, @p)
207 207  
  208 + vote_options = {:visitor_identifier => visitor.identifier,
  209 + :appearance_lookup => @a.lookup,
  210 + :prompt => @p,
  211 + :time_viewed => rand(1000),
  212 + :direction => (rand(2) == 0) ? "left" : "right"}
  213 +
208 214 choice = rand(3)
209 215 case choice
210 216 when 0
211   - user.record_vote(visitor.identifier, @a.lookup, @p, rand(2), rand(1000))
  217 + user.record_vote(vote_options)
212 218 when 1
213 219 user.record_skip(visitor.identifier, @a.lookup, @p, rand(1000))
214 220 when 2
... ...