mirror of
https://github.com/discourse/discourse.git
synced 2024-12-16 03:05:57 +08:00
16 lines
387 B
Ruby
16 lines
387 B
Ruby
require 'spec_helper'
|
|
|
|
describe DirectoryItem do
|
|
context 'refresh' do
|
|
let!(:post) { Fabricate(:post) }
|
|
|
|
it "creates the record for the user" do
|
|
DirectoryItem.refresh!
|
|
expect(DirectoryItem.where(period_type: DirectoryItem.period_types[:all])
|
|
.where(user_id: post.user.id)
|
|
.exists?).to be_truthy
|
|
end
|
|
|
|
end
|
|
end
|