mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
Initial release of Discourse
This commit is contained in:
14
spec/models/draft_sequence_spec.rb
Normal file
14
spec/models/draft_sequence_spec.rb
Normal file
@ -0,0 +1,14 @@
|
||||
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
|
Reference in New Issue
Block a user