Skip to content

Commit f613d38

Browse files
committed
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>
1 parent 64d5831 commit f613d38

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

app/models/broadcast_policies/wiki_page_policy.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def should_dispatch_updated_wiki_page?
1111
return false if wiki_page.wiki.context.concluded?
1212
return false if wiki_page.wiki.context.respond_to?(:unpublished?) && wiki_page.wiki.context.unpublished?
1313
end
14-
return false unless created_before?(30.minutes.ago)
14+
return false unless created_before?(1.minutes.ago)
1515
changed_while_published? || wiki_page.changed_state(:active)
1616
end
1717

spec/models/broadcast_policies/wiki_page_policy_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def wont_send_when
4747
expect(policy.should_dispatch_updated_wiki_page?).to be_falsey
4848
end
4949

50-
specify { wont_send_when { wiki_page.stubs(:created_at).returns 1.minute.ago } }
50+
specify { wont_send_when { wiki_page.stubs(:created_at).returns 30.seconds.ago } }
5151
specify { wont_send_when { wiki_page.stubs(:published?).returns false } }
5252
specify { wont_send_when { wiki_page.stubs(:wiki_page_changed).returns false } }
5353
specify { wont_send_when { wiki_page.stubs(:prior_version).returns nil } }

0 commit comments

Comments
 (0)