-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove notifications #1393
Remove notifications #1393
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1393 +/- ##
==========================================
- Coverage 77.38% 77.36% -0.02%
==========================================
Files 495 497 +2
Lines 13164 13159 -5
==========================================
- Hits 10187 10181 -6
- Misses 2977 2978 +1
Continue to review full report at Codecov.
|
activity = Activity.last | ||
assert_equal page, activity.subject | ||
assert_equal admin, activity.author | ||
assert_equal "gobierto_cms.page_updated", activity.action |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer single-quoted strings when you don't need string interpolation or special symbols.
def test_page_updated_event_handling | ||
assert_difference "Activity.count" do | ||
subject.page_updated Event.new(name: "activities/gobierto_cms_pages.page_updated", payload: { | ||
subject: page, author: admin, ip: IP, site_id: site.id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long. [93/80]
|
||
def test_page_updated_event_handling | ||
assert_difference "Activity.count" do | ||
subject.page_updated Event.new(name: "activities/gobierto_cms_pages.page_updated", payload: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer single-quoted strings when you don't need string interpolation or special symbols.
Line is too long. [99/80]
end | ||
|
||
def test_page_updated_event_handling | ||
assert_difference "Activity.count" do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer single-quoted strings when you don't need string interpolation or special symbols.
assert_equal site.id, activity.site_id | ||
end | ||
|
||
def test_page_updated_event_handling |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assignment Branch Condition size for test_page_updated_event_handling is too high. [23.02/15]
Method has too many lines. [11/10]
end | ||
|
||
def subject | ||
@subject ||= Subscribers::GobiertoCmsPageActivity.new("activities") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer single-quoted strings when you don't need string interpolation or special symbols.
class Subscribers::GobiertoCmsPageActivityTest < ActiveSupport::TestCase | ||
class Event < OpenStruct; end | ||
|
||
IP = "1.2.3.4" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
||
require "test_helper" | ||
|
||
class Subscribers::GobiertoCmsPageActivityTest < ActiveSupport::TestCase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use nested module/class definitions instead of compact style.
@@ -0,0 +1,59 @@ | |||
# frozen_string_literal: true | |||
|
|||
require "test_helper" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer single-quoted strings when you don't need string interpolation or special symbols.
end | ||
|
||
activity = Activity.last | ||
assert_equal attachment, activity.subject | ||
assert_equal admin, activity.author | ||
assert_equal "gobierto_attachments.attachment.updated", activity.action | ||
refute activity.admin_activity | ||
assert_equal "gobierto_attachments.attachment_updated", activity.action |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer single-quoted strings when you don't need string interpolation or special symbols.
Hmmmm, I think #1420 is related with this PR. Should we remove the existing notifications from the database to avoid the issue? |
yes
|
@furilo @ferblape Thank you for your help, I had the migration before I went to the doctor 😄 Upload migration and tested in https://participacion.gobify.net/user/notifications |
I still can see the missing translation in the home of Alcobendas:
https://newalcobendas.gobify.net/participacion
…On 9 February 2018 at 10:55, Adrián ***@***.***> wrote:
@furilo <https://github.com/furilo> @ferblape
<https://github.com/ferblape> Thank you for your help, I had the
migration before I went to the doctor 😄 Upload migration and tested in
https://participacion.gobify.net/user/notifications
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1393 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABE0F_vDijPcG88Mjb-jHJ_dgve5vDcks5tTBX_gaJpZM4R1Srd>
.
--
Fernando Blat
twitter.com/ferblape
Populate / Projects for civic engagement
https://populate.tools
|
Fixed @ferblape |
Closes #234
Closes #1420
What does this PR do?
Notifications have been limited in the case of topics and processes, only for creation. I haven't found references in Gobierto where only the creation was notified, I had doubts in expressing it:
How should this be manually tested?
Update a issue or process and you shouldn't receive notification