Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
46 lines (37 sloc) 1.2 KB
puts "Start server with 'cd server; thin -p 8080 start'"
puts "(if you haven't done so already)"
require File.expand_path '../../../../client/lib/picky-client', __FILE__
rescue LoadError
require 'picky-client'
require_relative 'model'
client = path: '/search'
# This will output nothing on the first run,
# but the server will dump/reload even
# when stopping/starting.
p "Expected: Nothing, Nothing OR 1, 1"
p 'surname:mcnama*'
p 'picky'
picky = 'Picky', surname: 'McNamara')
florian = 'Florian', surname: 'Hanke')
tentacles = 'Tentacles', surname: 'Jellyfish')
p "Expected: 1, 2"
p 'surname:mcnama*'
p 'hanke'
florian.update_attributes! name: 'Kaspar', surname: 'Schiess'
tentacles.update_attributes! name: 'Roger', surname: 'Braun'
p "Expected: Nothing, 2, 3"
p 'hanke' # Not found anymore.
p 'surname:schies*'
p 'roger'
p "Expected: Nothing, Nothing"
p 'surname:schies*' # (Not found anymore)
p 'roger' # And out. (Not found anymore)
Something went wrong with that request. Please try again.