This repository has been archived on 2025-05-04. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
discourse/spec/models/draft_sequence_spec.rb
2013-02-26 07:31:35 +03:00

14 lines
345 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