DEV: Minor fixes to spec.
This commit is contained in:
parent
004cf718b9
commit
88d5346aad
|
@ -65,7 +65,8 @@ describe 'integration tests' do
|
||||||
|
|
||||||
before do
|
before do
|
||||||
SiteSetting.assign_locks_flags = true
|
SiteSetting.assign_locks_flags = true
|
||||||
TopicCustomField.create(
|
|
||||||
|
TopicCustomField.create!(
|
||||||
topic_id: post.topic_id,
|
topic_id: post.topic_id,
|
||||||
name: TopicAssigner::ASSIGNED_TO_ID,
|
name: TopicAssigner::ASSIGNED_TO_ID,
|
||||||
value: Discourse.system_user.id
|
value: Discourse.system_user.id
|
||||||
|
@ -73,12 +74,13 @@ describe 'integration tests' do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "do not raise error if topic is deleted" do
|
it "do not raise error if topic is deleted" do
|
||||||
expect { DiscourseEvent.trigger(:before_staff_flag_action, args) }.to raise_error(Discourse::InvalidAccess)
|
expect { DiscourseEvent.trigger(:before_staff_flag_action, args) }
|
||||||
|
.to raise_error(Discourse::InvalidAccess)
|
||||||
|
|
||||||
post.topic.destroy!
|
post.topic.destroy!
|
||||||
post.reload
|
post.reload
|
||||||
|
|
||||||
expect { DiscourseEvent.trigger(:before_staff_flag_action, args) }.not_to raise_error
|
DiscourseEvent.trigger(:before_staff_flag_action, args)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue