workaround fabricator not working correctly

This commit is contained in:
Sam Saffron 2018-06-12 14:44:59 +10:00
parent 646ed87aba
commit 003df147a5
2 changed files with 10 additions and 2 deletions

View File

@ -181,5 +181,4 @@ Migration::TableDropper.delayed_drop(
}
)
STDERR.puts "Resetting Active Record Cache"
Discourse.reset_active_record_cache

View File

@ -1,7 +1,16 @@
require 'rails_helper'
RSpec.describe TopicTimer, type: :model do
let(:topic_timer) { Fabricate(:topic_timer) }
let(:topic_timer) {
# we should not need to do this but somehow
# fabricator is failing here
TopicTimer.create!(
user_id: -1,
topic: Fabricate(:topic),
execute_at: 1.hour.from_now,
status_type: TopicTimer.types[:close]
)
}
let(:topic) { Fabricate(:topic) }
let(:admin) { Fabricate(:admin) }