add another test

This commit is contained in:
Sam Saffron 2015-06-02 20:27:47 +10:00
parent 0fd1974838
commit 40882a9576

View File

@ -37,6 +37,11 @@ describe Draft do
it 'can cleanup old' do it 'can cleanup old' do
user = Fabricate(:user) user = Fabricate(:user)
key = Draft::NEW_TOPIC key = Draft::NEW_TOPIC
Draft.set(user,key,0,'draft')
Draft.cleanup!
expect(Draft.count).to eq 1
seq = DraftSequence.next!(user, key) seq = DraftSequence.next!(user, key)
Draft.set(user,key,seq,'draft') Draft.set(user,key,seq,'draft')