justin_dz spec for save bug
This commit is contained in:
parent
47087507dd
commit
12c09085df
1 changed files with 21 additions and 0 deletions
|
@ -77,6 +77,27 @@ class Article < CouchRest::Model
|
|||
end
|
||||
end
|
||||
|
||||
class Player < CouchRest::Model
|
||||
unique_id :email
|
||||
|
||||
key_accessor :email, :name, :str, :coord, :int, :con, :spirit, :level, :xp, :points, :coins, :date, :items, :loc
|
||||
|
||||
view_by :name, :descending => true
|
||||
view_by :loc
|
||||
|
||||
timestamps!
|
||||
end
|
||||
|
||||
describe "save bug" do
|
||||
it "should fix" do
|
||||
@db = reset_test_db!
|
||||
@p = Player.new
|
||||
@p.email = 'insane@fakestreet.com'
|
||||
@p.save
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
describe CouchRest::Model do
|
||||
before(:all) do
|
||||
@cr = CouchRest.new(COUCHHOST)
|
||||
|
|
Loading…
Reference in a new issue