mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
use shared_examples_for versioning, for both posts and topics
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
shared_examples_for "a versioned model" do
|
||||
let(:model) { Fabricate(described_class.to_s.downcase) }
|
||||
let(:first_version_at) { model.last_version_at }
|
||||
|
||||
it 'should be versioned' do
|
||||
model.should respond_to(:version)
|
||||
end
|
||||
|
||||
it 'has an initial version of 1' do
|
||||
model.version.should == 1
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user