Skip to content

Commit

Permalink
fix rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
digitaltom committed Dec 3, 2024
1 parent 192d164 commit 3f5a6e8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def authenticate_system(skip_on_duplicated: false)
if system_tokens_enabled? && request.headers.key?(SYSTEM_TOKEN_HEADER)
@system.update(last_seen_at: Time.zone.now)
headers[SYSTEM_TOKEN_HEADER] = @system.system_token
# only update last_seen_at each 3 minutes,
# only update last_seen_at each 3 minutes,
# so that a system that calls SCC every second doesn't write + lock the database row
elsif !@system.last_seen_at || @system.last_seen_at < 3.minutes.ago
@system.touch(:last_seen_at)
Expand Down
2 changes: 0 additions & 2 deletions spec/requests/api/connect/base_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ def require_product

shared_examples 'creates a duplicate system' do
it 'creates a new System (duplicate)' do

expect { get :service, params: { id: 1 } }
.to change { System.get_by_credentials(system.login, system.password).count }
.by(1)
Expand Down Expand Up @@ -182,7 +181,6 @@ def require_product

include_examples 'does not create a duplicate system'
include_examples "does not update the old system's token"

end

context 'when the system has a token and the header is blank' do
Expand Down

0 comments on commit 3f5a6e8

Please sign in to comment.