Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ source 'https://rubygems.org'
ruby '3.2.4'

# Standard rails
gem 'rails', '~> 7.1.5.1'
gem 'rails', '~> 7.2.2.1'
gem 'puma', '~> 6.5' # roar
gem 'sdoc', '~> 2.6.0', group: :doc
gem 'nokogiri', '>= 1.13.4'
Expand Down
142 changes: 69 additions & 73 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,63 +2,58 @@ GEM
remote: https://rubygems.org/
specs:
Ascii85 (1.1.0)
actioncable (7.1.5.1)
actionpack (= 7.1.5.1)
activesupport (= 7.1.5.1)
actioncable (7.2.2.1)
actionpack (= 7.2.2.1)
activesupport (= 7.2.2.1)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
zeitwerk (~> 2.6)
actionmailbox (7.1.5.1)
actionpack (= 7.1.5.1)
activejob (= 7.1.5.1)
activerecord (= 7.1.5.1)
activestorage (= 7.1.5.1)
activesupport (= 7.1.5.1)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.1.5.1)
actionpack (= 7.1.5.1)
actionview (= 7.1.5.1)
activejob (= 7.1.5.1)
activesupport (= 7.1.5.1)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
actionmailbox (7.2.2.1)
actionpack (= 7.2.2.1)
activejob (= 7.2.2.1)
activerecord (= 7.2.2.1)
activestorage (= 7.2.2.1)
activesupport (= 7.2.2.1)
mail (>= 2.8.0)
actionmailer (7.2.2.1)
actionpack (= 7.2.2.1)
actionview (= 7.2.2.1)
activejob (= 7.2.2.1)
activesupport (= 7.2.2.1)
mail (>= 2.8.0)
rails-dom-testing (~> 2.2)
actionpack (7.1.5.1)
actionview (= 7.1.5.1)
activesupport (= 7.1.5.1)
actionpack (7.2.2.1)
actionview (= 7.2.2.1)
activesupport (= 7.2.2.1)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4)
rack (>= 2.2.4, < 3.2)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
actiontext (7.1.5.1)
actionpack (= 7.1.5.1)
activerecord (= 7.1.5.1)
activestorage (= 7.1.5.1)
activesupport (= 7.1.5.1)
useragent (~> 0.16)
actiontext (7.2.2.1)
actionpack (= 7.2.2.1)
activerecord (= 7.2.2.1)
activestorage (= 7.2.2.1)
activesupport (= 7.2.2.1)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.1.5.1)
activesupport (= 7.1.5.1)
actionview (7.2.2.1)
activesupport (= 7.2.2.1)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
activejob (7.1.5.1)
activesupport (= 7.1.5.1)
activejob (7.2.2.1)
activesupport (= 7.2.2.1)
globalid (>= 0.3.6)
activemodel (7.1.5.1)
activesupport (= 7.1.5.1)
activerecord (7.1.5.1)
activemodel (= 7.1.5.1)
activesupport (= 7.1.5.1)
activemodel (7.2.2.1)
activesupport (= 7.2.2.1)
activerecord (7.2.2.1)
activemodel (= 7.2.2.1)
activesupport (= 7.2.2.1)
timeout (>= 0.4.0)
activerecord-session_store (2.1.0)
actionpack (>= 6.1)
Expand All @@ -67,25 +62,24 @@ GEM
multi_json (~> 1.11, >= 1.11.2)
rack (>= 2.0.8, < 4)
railties (>= 6.1)
activestorage (7.1.5.1)
actionpack (= 7.1.5.1)
activejob (= 7.1.5.1)
activerecord (= 7.1.5.1)
activesupport (= 7.1.5.1)
activestorage (7.2.2.1)
actionpack (= 7.2.2.1)
activejob (= 7.2.2.1)
activerecord (= 7.2.2.1)
activesupport (= 7.2.2.1)
marcel (~> 1.0)
activesupport (7.1.5.1)
activesupport (7.2.2.1)
base64
benchmark (>= 0.3)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
concurrent-ruby (~> 1.0, >= 1.3.1)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
logger (>= 1.4.2)
minitest (>= 5.1)
mutex_m
securerandom (>= 0.3)
tzinfo (~> 2.0)
tzinfo (~> 2.0, >= 2.0.5)
acts_as_tenant (0.6.1)
rails (>= 5.2)
request_store (>= 1.0.5)
Expand Down Expand Up @@ -147,7 +141,7 @@ GEM
dotenv (= 3.1.7)
railties (>= 6.1)
drb (2.2.1)
erubi (1.13.0)
erubi (1.13.1)
factory_bot (6.5.0)
activesupport (>= 5.0.0)
factory_bot_rails (6.4.4)
Expand Down Expand Up @@ -247,7 +241,6 @@ GEM
multi_json (1.15.0)
multi_xml (0.7.1)
bigdecimal (~> 3.1)
mutex_m (0.3.0)
net-http (0.6.0)
uri
net-imap (0.5.5)
Expand Down Expand Up @@ -313,7 +306,7 @@ GEM
pry (0.15.2)
coderay (~> 1.1)
method_source (~> 1.0)
psych (5.2.2)
psych (5.2.3)
date
stringio
public_suffix (5.0.5)
Expand All @@ -327,26 +320,27 @@ GEM
base64 (>= 0.1.0)
logger (>= 1.6.0)
rack (>= 3.0.0, < 4)
rack-session (2.0.0)
rack-session (2.1.0)
base64 (>= 0.1.0)
rack (>= 3.0.0)
rack-test (2.2.0)
rack (>= 1.3)
rackup (2.2.1)
rack (>= 3)
rails (7.1.5.1)
actioncable (= 7.1.5.1)
actionmailbox (= 7.1.5.1)
actionmailer (= 7.1.5.1)
actionpack (= 7.1.5.1)
actiontext (= 7.1.5.1)
actionview (= 7.1.5.1)
activejob (= 7.1.5.1)
activemodel (= 7.1.5.1)
activerecord (= 7.1.5.1)
activestorage (= 7.1.5.1)
activesupport (= 7.1.5.1)
rails (7.2.2.1)
actioncable (= 7.2.2.1)
actionmailbox (= 7.2.2.1)
actionmailer (= 7.2.2.1)
actionpack (= 7.2.2.1)
actiontext (= 7.2.2.1)
actionview (= 7.2.2.1)
activejob (= 7.2.2.1)
activemodel (= 7.2.2.1)
activerecord (= 7.2.2.1)
activestorage (= 7.2.2.1)
activesupport (= 7.2.2.1)
bundler (>= 1.15.0)
railties (= 7.1.5.1)
railties (= 7.2.2.1)
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
minitest
Expand All @@ -357,10 +351,10 @@ GEM
rails-i18n (7.0.10)
i18n (>= 0.7, < 2)
railties (>= 6.0.0, < 8)
railties (7.1.5.1)
actionpack (= 7.1.5.1)
activesupport (= 7.1.5.1)
irb
railties (7.2.2.1)
actionpack (= 7.2.2.1)
activesupport (= 7.2.2.1)
irb (~> 1.13)
rackup (>= 1.0.0)
rake (>= 12.2)
thor (~> 1.0, >= 1.2.2)
Expand All @@ -370,7 +364,7 @@ GEM
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
rdoc (6.10.0)
rdoc (6.11.0)
psych (>= 4.0.0)
regexp_parser (2.10.0)
reline (0.6.0)
Expand Down Expand Up @@ -462,6 +456,7 @@ GEM
unicode-display_width (2.6.0)
uniform_notifier (1.16.0)
uri (1.0.2)
useragent (0.16.11)
version_gem (1.1.4)
view_component (3.21.0)
activesupport (>= 5.2.0, < 8.1)
Expand All @@ -470,7 +465,8 @@ GEM
warden (1.2.9)
rack (>= 2.0.9)
websocket (1.2.11)
websocket-driver (0.7.6)
websocket-driver (0.7.7)
base64
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
wicked (2.0.0)
Expand Down Expand Up @@ -529,7 +525,7 @@ DEPENDENCIES
puma (~> 6.5)
rack-attack (~> 6.7.0)
rack-test (>= 0.6.3)
rails (~> 7.1.5.1)
rails (~> 7.2.2.1)
rails-html-sanitizer (>= 1.4.3)
rails-i18n (~> 7.0)
render_async (~> 2.1)
Expand Down
5 changes: 2 additions & 3 deletions test/controllers/lines_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ class LinesControllerTest < ActionDispatch::IntegrationTest
describe 'instance with no lines' do
it 'should raise an error' do
@line.destroy
assert_raises Exceptions::NoLinesForFundError do
get new_line_path
end
get new_line_path
assert_equal response.status, 500
end
end
end
Expand Down
25 changes: 12 additions & 13 deletions test/controllers/patients_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,8 @@ class PatientsControllerTest < ActionDispatch::IntegrationTest

it 'should not serve html' do
sign_in @data_volunteer
assert_raise ActionController::UnknownFormat do
get patients_path
end
get patients_path
assert_equal response.status, 406
end

it 'should get csv when user is admin' do
Expand Down Expand Up @@ -75,9 +74,9 @@ class PatientsControllerTest < ActionDispatch::IntegrationTest
it 'should not contain personally-identifying information' do
sign_in @data_volunteer
get patients_path(format: :csv)
refute_match @patient.name.to_s, response.body
refute_match @patient.primary_phone.to_s, response.body
refute_match @patient.other_phone.to_s, response.body
assert_no_match @patient.name.to_s, response.body
assert_no_match @patient.primary_phone.to_s, response.body
assert_no_match @patient.other_phone.to_s, response.body
end

it 'should escape fields with attempted formula injection' do
Expand Down Expand Up @@ -322,14 +321,14 @@ class PatientsControllerTest < ActionDispatch::IntegrationTest
pledge_generator_mock = Minitest::Mock.new
pdf_mock_result = Minitest::Mock.new
pledge_generator_mock.expect(:generate_pledge_pdf, pdf_mock_result)
pdf_mock_result.expect :render, "mow"
pdf_mock_result.expect :render, 'mow'
assert_nil @patient.pledge_generated_at
PledgeFormGenerator.stub(:new, pledge_generator_mock) do
get generate_pledge_patient_path(@patient), params: { case_manager_name: 'somebody' }
end

refute_nil @patient.reload.pledge_generated_at
refute_nil @patient.reload.pledge_generated_by
assert_not_nil @patient.reload.pledge_generated_at
assert_not_nil @patient.reload.pledge_generated_by
assert_response :success
end
end
Expand All @@ -347,8 +346,8 @@ class PatientsControllerTest < ActionDispatch::IntegrationTest
HTTParty.stub(:post, fake_result) do
post fetch_pledge_patient_path(@patient), params: {}
end
refute_nil @patient.reload.pledge_generated_at
refute_nil @patient.reload.pledge_generated_by
assert_not_nil @patient.reload.pledge_generated_at
assert_not_nil @patient.reload.pledge_generated_by
assert_response :success
end

Expand Down Expand Up @@ -437,7 +436,7 @@ class PatientsControllerTest < ActionDispatch::IntegrationTest
assert_difference 'Patient.count', -1 do
delete patient_path(@patient)
end
refute_nil flash[:notice]
assert_not_nil flash[:notice]
end

it 'should prevent a patient from being destroyed under some circumstances' do
Expand All @@ -449,7 +448,7 @@ class PatientsControllerTest < ActionDispatch::IntegrationTest
assert_no_difference 'Patient.count' do
delete patient_path(@patient)
end
refute_nil flash[:alert]
assert_not_nil flash[:alert]
end
end
end
Expand Down
Loading
Loading