mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 19:37:55 +08:00
15 lines
346 B
Ruby
15 lines
346 B
Ruby
|
require 'spec_helper'
|
||
|
|
||
|
describe DraftSequence do
|
||
|
it 'should produce next sequence for a key' do
|
||
|
u = Fabricate(:user)
|
||
|
DraftSequence.next!(u, 'test').should == 1
|
||
|
DraftSequence.next!(u, 'test').should == 2
|
||
|
end
|
||
|
|
||
|
it 'should return 0 by default' do
|
||
|
u = Fabricate(:user)
|
||
|
DraftSequence.current(u, 'test').should == 0
|
||
|
end
|
||
|
end
|