Skip to content
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

[22 | 24] Users can login/logout via Rails app #101

Merged
merged 13 commits into from
Aug 9, 2024

Conversation

cpreisinger
Copy link
Contributor

@cpreisinger cpreisinger self-assigned this Aug 5, 2024
…can-login-via-rails

* 'dev' of github.com:GSA/Challenge_platform:
  Update DEVCONFIG.md
  make CircleCI happier
  add login.gov certs and configuration
@cpreisinger cpreisinger force-pushed the 22/user-can-login-via-rails branch from bc92afe to f645e0e Compare August 6, 2024 00:11
Copy link
Contributor

@stepchud stepchud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The login/logout functionality seems like it's working but when I run bundle exec rspec locally on your branch, I get a simplecov error:

✗ bundle exec rspec
....................

Finished in 0.29338 seconds (files took 1.4 seconds to load)
20 examples, 0 failures

Coverage report generated for RSpec to /Users/stephen/code/Challenge_platform/coverage. 253 / 276 LOC (91.67%) covered.
/Users/stephen/code/Challenge_platform/.nix-bundler/ruby/3.2.0/gems/simplecov-0.17.1/lib/simplecov.rb:243:in `result_exit_status': undefined method `-' for nil:NilClass (NoMethodError)

        coverage_diff = last_run["result"]["covered_percent"] - covered_percent
                                                              ^
	from /Users/stephen/code/Challenge_platform/.nix-bundler/ruby/3.2.0/gems/simplecov-0.17.1/lib/simplecov.rb:224:in `process_result'
	from /Users/stephen/code/Challenge_platform/.nix-bundler/ruby/3.2.0/gems/simplecov-0.17.1/lib/simplecov.rb:205:in `run_exit_tasks!'
	from /Users/stephen/code/Challenge_platform/.nix-bundler/ruby/3.2.0/gems/simplecov-0.17.1/lib/simplecov/defaults.rb:29:in `block in <top (required)>'

is there a way to fix it?

nevermind, this is happening on dev already. I thought it was related to this PR since you mentioned something about simplecov this morning.

EDIT: I'm not seeing it anymore

Copy link
Contributor

@stepchud stepchud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

couple of comments to address

app/models/application_record.rb Outdated Show resolved Hide resolved
app/models/application_record.rb Outdated Show resolved Hide resolved
app/models/user.rb Outdated Show resolved Hide resolved
app/models/user.rb Outdated Show resolved Hide resolved
app/models/user.rb Outdated Show resolved Hide resolved
app/models/user.rb Show resolved Hide resolved
…can-login-via-rails

* 'dev' of github.com:GSA/Challenge_platform:
  fix User attributes, add shared example spec
  updated tests for logged_at validation
  Update app/models/security_log.rb
  created shared_examples for redundant tests
  fix typo
  linting and annotations
  Created rails security log model and basic spec test
Copy link
Contributor

@stepchud stepchud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🤘

@@ -64,6 +71,32 @@
end
end

describe 'timestamps' do
it 'properly sets inserted_at and updated_at' do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤘

Comment on lines +10 to +14
def self.timestamp_attributes_for_create
# only strings allowed here, symbols won't work, see below commit for more details
# https://github.com/rails/rails/commit/2b5dacb43dd92e98e1fd240a80c2a540ed380257
super << 'inserted_at'
end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤘

@@ -66,4 +66,6 @@
config.filter_rails_from_backtrace!
# arbitrary gems may also be filtered via:
# config.filter_gems_from_backtrace("gem name")

config.include ActiveSupport::Testing::TimeHelpers
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL

@cpreisinger cpreisinger merged commit 43b47b9 into dev Aug 9, 2024
8 checks passed
@cpreisinger cpreisinger deleted the 22/user-can-login-via-rails branch August 9, 2024 19:15
@r-bartlett-gsa r-bartlett-gsa added this to the Sprint 08/13/24 milestone Aug 29, 2024
@r-bartlett-gsa r-bartlett-gsa linked an issue Aug 29, 2024 that may be closed by this pull request
39 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

User logout
3 participants