don't suppress notifications for recently created wiki pages
test plan: * create a course with a student * as the student, set "Course Content" notification settings to ASAP * create a wiki page and publish it * wait one minute * edit the wiki page and check the "Notify users that this content has changed" * it should send out a notification closes #CNVS-16153 Change-Id: I4ed21717ca38f11ba44225ce886b32f47417acde Reviewed-on: https://gerrit.instructure.com/75057 Reviewed-by: Jeremy Stanley <jeremy@instructure.com> Tested-by: Jenkins QA-Review: Heath Hales <hhales@instructure.com> Product-Review: James Williams <jamesw@instructure.com>
This commit is contained in:
parent
64d58310c1
commit
f613d384d7
|
@ -11,7 +11,7 @@ module BroadcastPolicies
|
|||
return false if wiki_page.wiki.context.concluded?
|
||||
return false if wiki_page.wiki.context.respond_to?(:unpublished?) && wiki_page.wiki.context.unpublished?
|
||||
end
|
||||
return false unless created_before?(30.minutes.ago)
|
||||
return false unless created_before?(1.minutes.ago)
|
||||
changed_while_published? || wiki_page.changed_state(:active)
|
||||
end
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ module BroadcastPolicies
|
|||
expect(policy.should_dispatch_updated_wiki_page?).to be_falsey
|
||||
end
|
||||
|
||||
specify { wont_send_when { wiki_page.stubs(:created_at).returns 1.minute.ago } }
|
||||
specify { wont_send_when { wiki_page.stubs(:created_at).returns 30.seconds.ago } }
|
||||
specify { wont_send_when { wiki_page.stubs(:published?).returns false } }
|
||||
specify { wont_send_when { wiki_page.stubs(:wiki_page_changed).returns false } }
|
||||
specify { wont_send_when { wiki_page.stubs(:prior_version).returns nil } }
|
||||
|
|
Loading…
Reference in New Issue