From 40882a9576c536aba1cfdd56b4fd29f01852d8b2 Mon Sep 17 00:00:00 2001 From: Sam Saffron Date: Tue, 2 Jun 2015 20:27:47 +1000 Subject: [PATCH] add another test --- spec/models/draft_spec.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spec/models/draft_spec.rb b/spec/models/draft_spec.rb index c910245ecf4..55cd3ac82a4 100644 --- a/spec/models/draft_spec.rb +++ b/spec/models/draft_spec.rb @@ -37,6 +37,11 @@ describe Draft do it 'can cleanup old' do user = Fabricate(:user) key = Draft::NEW_TOPIC + + Draft.set(user,key,0,'draft') + Draft.cleanup! + expect(Draft.count).to eq 1 + seq = DraftSequence.next!(user, key) Draft.set(user,key,seq,'draft')