-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
63 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,23 @@ | ||
<p> | ||
Thanks for volunteering to help analyze changes to government web pages for EDGI! To set up your account, point your web browser to: | ||
Thank you for signing up to test our website monitoring software, Scanner! | ||
</p> | ||
<p> | ||
Scanner is currently a work in progress and we'd like to be upfront about various limitations and concerns that we have. | ||
</p> | ||
<p> | ||
Primarily, we're concerned about erroneous interpretation of changes to webpages that may propagate through social media, news media, or the public more widely. We have seen this happen many times through our work monitoring changes to environmental, climate, and energy websites: <%= link_to "https://envirodatagov.org/website-monitoring", "https://envirodatagov.org/website-monitoring" %> | ||
</p> | ||
In the past, people have jumped to conclusions from the changes they see on monitored web sites, assuming data is removed based on a single missing link or a temporary bug on a government web server. The changes you see in Scanner are a great jumping-off point for further research, but remember they are not the whole story, especially if those changes are extremely recent. | ||
</p> | ||
<p> | ||
Scanner may present certain changes wrongly or mislead users in ways that we cannot yet predict or anticipate. We are working to understand these limitations, but for this reason, we are being careful about who gets access to our platform early on. In the long term, we would love for Scanner to be a public platform for all to use, but we'd like to think about harms and impacts carefully before a public release. | ||
</p> | ||
<p> | ||
Please do not disseminate information about Scanner or share credentials for Scanner. We'd love for you to check it out and give us feedback in any form that you see fit. You can also follow along with our software development work on GitHub: <%= link_to "https://github.com/edgi-govdata-archiving/web-monitoring", "https://github.com/edgi-govdata-archiving/web-monitoring" %> or chat with us on Slack: <%= link_to "https://archivers-slack.herokuapp.com/", "https://archivers-slack.herokuapp.com/" %> | ||
</p> | ||
<p> | ||
To set up your account, point your web browser to: | ||
</p> | ||
|
||
<p> | ||
<%= link_to @url, @url %> | ||
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,15 @@ | ||
Thanks for volunteering to help analyze changes to government web pages for EDGI! To set up your account, point your web browser to: | ||
Thank you for signing up to test our website monitoring software, Scanner! | ||
|
||
<%= @url %> | ||
Scanner is currently a work in progress and we'd like to be upfront about various limitations and concerns that we have. | ||
|
||
Primarily, we're concerned about erroneous interpretation of changes to webpages that may propagate through social media, news media, or the public more widely. We have seen this happen many times through our work monitoring changes to environmental, climate, and energy websites: https://envirodatagov.org/website-monitoring | ||
|
||
In the past, people have jumped to conclusions from the changes they see on monitored web sites, assuming data is removed based on a single missing link or a temporary bug on a government web server. The changes you see in Scanner are a great jumping-off point for further research, but remember they are not the whole story, especially if those changes are extremely recent. | ||
|
||
Scanner may present certain changes wrongly or mislead users in ways that we cannot yet predict or anticipate. We are working to understand these limitations, but for this reason, we are being careful about who gets access to our platform early on. In the long term, we would love for Scanner to be a public platform for all to use, but we'd like to think about harms and impacts carefully before a public release. | ||
|
||
Please do not disseminate information about Scanner or share credentials for Scanner. We'd love for you to check it out and give us feedback in any form that you see fit. You can also follow along with our software development work on GitHub: https://github.com/edgi-govdata-archiving/web-monitoring -- or chat with us on Slack: https://archivers-slack.herokuapp.com/ | ||
|
||
To set up your account, point your web browser to: | ||
|
||
<%= @url %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,32 @@ | ||
require 'test_helper' | ||
|
||
class InvitationMailerTest < ActionMailer::TestCase | ||
# test "the truth" do | ||
# assert true | ||
# end | ||
# Make it possible to generate URLs. In mailer tests, URL helpers are missing | ||
# the action_mailer URL configuration. | ||
# NOTE: this is handled automatically in RSpec | ||
include Rails.application.routes.url_helpers | ||
def mail_url(route, options = nil) | ||
url_for([ | ||
route, | ||
Rails.application.config.action_mailer.default_url_options.merge(options) | ||
]) | ||
end | ||
|
||
def test_send_invitation_email | ||
invitation = Invitation.create(email: "test@email.com") | ||
invitation.update_attributes(code: "eff7df8ccc0cd0256619") | ||
email = InvitationMailer.invitation_email(invitation) | ||
|
||
assert_emails 1 do | ||
email.deliver_now | ||
end | ||
|
||
assert_equal "Welcome to EDGI web monitoring", email.subject | ||
assert_equal [ENV.fetch('MAIL_SENDER', 'web-monitoring-db@envirodatagov.org')], email.from | ||
assert_equal ["test@email.com"], email.to | ||
|
||
invite_url = mail_url(:new_user_registration, invitation: invitation.code) | ||
assert_includes email.html_part.body.to_s, invite_url | ||
assert_includes email.text_part.body.to_s, invite_url | ||
end | ||
end |