Skip to content

Commit

Permalink
Clear deprecation warnings in tests. Chnage the new data available br…
Browse files Browse the repository at this point in the history
…oadcast so that it broadcasts immediately.
  • Loading branch information
CraigJZ committed Nov 14, 2024
1 parent 81c3911 commit ea957ae
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ gem 'turbo-rails', '~> 1.5'
group :development, :test do
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
gem "debug", platforms: %i[mri mingw x64_mingw]
gem 'rubocop-rails', '2.25.1'
gem 'rubocop-rails', '~> 2.27'
end

group :development do
Expand Down
14 changes: 7 additions & 7 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ GEM
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
json (2.7.2)
json (2.8.2)
language_server-protocol (3.17.0.3)
listen (3.9.0)
rb-fsevent (~> 0.10, >= 0.10.3)
Expand Down Expand Up @@ -248,7 +248,7 @@ GEM
racc (~> 1.4)
nokogiri (1.16.7-x86_64-linux)
racc (~> 1.4)
parallel (1.25.1)
parallel (1.26.3)
parser (3.3.0.5)
ast (~> 2.4.1)
racc
Expand Down Expand Up @@ -322,7 +322,7 @@ GEM
nokogiri (~> 1)
rubyzip (>= 1.3.0, < 3.0.0)
rouge (4.1.2)
rubocop (1.65.0)
rubocop (1.65.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
Expand All @@ -335,10 +335,10 @@ GEM
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.31.2)
parser (>= 3.3.0.4)
rubocop-rails (2.25.1)
rubocop-rails (2.27.0)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
rubocop (>= 1.52.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
ruby-progressbar (1.13.0)
ruby-vips (2.2.1)
Expand Down Expand Up @@ -391,7 +391,7 @@ GEM
railties (>= 6.0.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.5.0)
unicode-display_width (2.6.0)
uniform_notifier (1.16.0)
useragent (0.16.10)
web-console (4.2.1)
Expand Down Expand Up @@ -440,7 +440,7 @@ DEPENDENCIES
redis (~> 5.2)
report_action (~> 0.6.0)
roo (~> 2.10)
rubocop-rails (= 2.25.1)
rubocop-rails (~> 2.27)
scout_apm (~> 5.3)
selenium-webdriver (~> 4.23)
sidekiq (~> 7.3)
Expand Down
2 changes: 1 addition & 1 deletion app/models/section.rb
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def self.import(filepath)
else
@import_report.report_item('Executing Import', 'Updated Sections', "<a href='/sections' class='dropdown-item'>All sections were touched by the import process.</a>")
end
Turbo::StreamsChannel.broadcast_update_later_to("new_data_notification", target: "new-data-available", partial: "sections/new_data_message", locals: { new_sections: @new_sections, updated_sections: @updated_sections })
Turbo::StreamsChannel.broadcast_update_to("new_data_notification", target: "new-data-available", partial: "sections/new_data_message", locals: { new_sections: @new_sections, updated_sections: @updated_sections })
send_report if @import_report.has_messages?('Executing Import', 'Updated Sections')
end

Expand Down
2 changes: 1 addition & 1 deletion app/models/setting.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def self.method_missing(method, *)
validates :graduate_enrollment_threshold, :undergraduate_enrollment_threshold, presence: true
validates :email_delivery, presence: true

enum email_delivery: { scheduled: 0, off: 1, on: 2 }
enum :email_delivery, { scheduled: 0, off: 1, on: 2 }

def self.delivery_options
email_deliveries.keys
Expand Down
2 changes: 1 addition & 1 deletion app/models/user.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class User < ApplicationRecord
enum status: { active: 0, archived: 1 }
enum :status, { active: 0, archived: 1 }

has_many :comments, -> { order 'created_at DESC' }

Expand Down
4 changes: 2 additions & 2 deletions test/application_system_test_case.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
Selenium::WebDriver.logger.ignore(:browser_options)

def login_as(user)
visit test_login_path
visit cas_login_path
fill_in 'username', with: user.username
fill_in 'password', with: 'any password'
click_button 'Login'
end

def test_login_path
def cas_login_path
'/fake_cas_login'
end

Expand Down

0 comments on commit ea957ae

Please sign in to comment.