mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
Initial release of Discourse
This commit is contained in:
commit
21b5628528
2932 changed files with 143949 additions and 0 deletions
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
|
Loading…
Add table
Add a link
Reference in a new issue