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

test 'incomplete spamaway test does not create new user record', and fix users controller to prevent user creation in this scenario #8467

Merged
merged 8 commits into from
Oct 6, 2020

Conversation

jywarren
Copy link
Member

@jywarren jywarren commented Oct 6, 2020

@gitpod-io
Copy link

gitpod-io bot commented Oct 6, 2020

@codecov
Copy link

codecov bot commented Oct 6, 2020

Codecov Report

Merging #8467 into main will decrease coverage by 26.94%.
The diff coverage is 16.66%.

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #8467       +/-   ##
===========================================
- Coverage   80.06%   53.11%   -26.95%     
===========================================
  Files         101      101               
  Lines        5919     6226      +307     
===========================================
- Hits         4739     3307     -1432     
- Misses       1180     2919     +1739     
Impacted Files Coverage Δ
app/controllers/comment_controller.rb 25.00% <0.00%> (-61.96%) ⬇️
app/controllers/map_controller.rb 10.52% <0.00%> (-39.48%) ⬇️
app/controllers/search_controller.rb 39.53% <0.00%> (-55.82%) ⬇️
app/controllers/users_controller.rb 51.67% <100.00%> (-28.33%) ⬇️
app/models/drupal_content_field_mapper.rb 0.00% <0.00%> (-100.00%) ⬇️
app/models/drupal_content_field_map_editor.rb 0.00% <0.00%> (-100.00%) ⬇️
app/controllers/batch_controller.rb 0.00% <0.00%> (-90.20%) ⬇️
app/services/execute_search.rb 0.00% <0.00%> (-88.89%) ⬇️
app/controllers/user_tags_controller.rb 0.00% <0.00%> (-84.29%) ⬇️
app/controllers/features_controller.rb 0.00% <0.00%> (-80.71%) ⬇️
... and 36 more

@jywarren
Copy link
Member Author

jywarren commented Oct 6, 2020

NIce! Hopefully failed for the right reason...

@jywarren
Copy link
Member Author

jywarren commented Oct 6, 2020

Nice!

 FAIL["test_incomplete_spamaway_test_does_not_create_new_user_record,_returns_useful_validation", #<Minitest::Reporters::Suite:0x000000000e88ab68 @name="SignUpTest">, 223.629028694]
 test_incomplete_spamaway_test_does_not_create_new_user_record,_returns_useful_validation#SignUpTest (223.63s)
        "User.count" didn't change by 0.
        Expected: 19
          Actual: 20
        test/integration/signup_flow_test.rb:85:in `block in <class:SignUpTest>'

OK, now the fix...

@jywarren jywarren requested a review from a team as a code owner October 6, 2020 20:32
@jywarren jywarren changed the title test 'incomplete spamaway test does not create new user record' test 'incomplete spamaway test does not create new user record', and fix users controller to prevent user creation in this scenario Oct 6, 2020
@jywarren
Copy link
Member Author

jywarren commented Oct 6, 2020

huh -- its not seeing: assert response.body.include? '1 error prohibited this user from being saved'

 FAIL["test_incomplete_spamaway_test_does_not_create_new_user_record,_returns_useful_validation", #<Minitest::Reporters::Suite:0x00000000147ae9f0 @name="SignUpTest">, 196.193361467]
 test_incomplete_spamaway_test_does_not_create_new_user_record,_returns_useful_validation#SignUpTest (196.19s)
        Expected false to be truthy.
        test/integration/signup_flow_test.rb:98:in `block in <class:SignUpTest>'

@jywarren
Copy link
Member Author

jywarren commented Oct 6, 2020

trying in gitpod...

@jywarren
Copy link
Member Author

jywarren commented Oct 6, 2020

Confirmed the message appears:

image

@jywarren
Copy link
Member Author

jywarren commented Oct 6, 2020

aha, ok, i left the blank area filled, so we had 2 errors instead of 1... fixed!

@jywarren
Copy link
Member Author

jywarren commented Oct 6, 2020

Hmm... now we get a failure on the next assertion:

 FAIL["test_incomplete_spamaway_test_does_not_create_new_user_record,_returns_useful_validation", #<Minitest::Reporters::Suite:0x000000000cafa760 @name="SignUpTest">, 21.407707958000003]
 test_incomplete_spamaway_test_does_not_create_new_user_record,_returns_useful_validation#SignUpTest (21.41s)
        Expected false to be truthy.
        test/integration/signup_flow_test.rb:99:in `block in <class:SignUpTest>'

@jywarren jywarren mentioned this pull request Oct 6, 2020
5 tasks
@jywarren
Copy link
Member Author

jywarren commented Oct 6, 2020

Same problem detecting text in test/integration/signup_flow_test.rb:99:in block in class:SignUpTest'` - testing manually in gitpod now...

@jywarren
Copy link
Member Author

jywarren commented Oct 6, 2020

Oooh interesting... functional test failure, i'll try restarting it... -- a weird one!


/home/travis/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/uri/common.rb:739:in `URI': bad argument (expected URI object or URI string) (ArgumentError)
	from /home/travis/build/publiclab/plots2/vendor/.bundle/ruby/2.6.0/gems/codecov-0.2.11/lib/codecov.rb:406:in `upload_to_v4'
	from /home/travis/build/publiclab/plots2/vendor/.bundle/ruby/2.6.0/gems/codecov-0.2.11/lib/codecov.rb:372:in `upload_to_codecov'
	from /home/travis/build/publiclab/plots2/vendor/.bundle/ruby/2.6.0/gems/codecov-0.2.11/lib/codecov.rb:470:in `format'
	from /home/travis/build/publiclab/plots2/vendor/.bundle/ruby/2.6.0/gems/simplecov-0.19.0/lib/simplecov/result.rb:51:in `format!'
	from /home/travis/build/publiclab/plots2/vendor/.bundle/ruby/2.6.0/gems/simplecov-0.19.0/lib/simplecov/configuration.rb:196:in `block in at_exit'
	from /home/travis/build/publiclab/plots2/vendor/.bundle/ruby/2.6.0/gems/simplecov-0.19.0/lib/simplecov.rb:189:in `run_exit_tasks!'
	from /home/travis/build/publiclab/plots2/vendor/.bundle/ruby/2.6.0/gems/simplecov-0.19.0/lib/simplecov.rb:179:in `at_exit_behavior'
	from /home/travis/build/publiclab/plots2/vendor/.bundle/ruby/2.6.0/gems/simplecov-0.19.0/lib/minitest/simplecov_plugin.rb:11:in `block in plugin_simplecov_init'
	from /home/travis/build/publiclab/plots2/vendor/.bundle/ruby/2.6.0/gems/minitest-5.14.2/lib/minitest.rb:64:in `reverse_each'
	from /home/travis/build/publiclab/plots2/vendor/.bundle/ruby/2.6.0/gems/minitest-5.14.2/lib/minitest.rb:64:in `block (2 levels) in autorun'

@jywarren
Copy link
Member Author

jywarren commented Oct 6, 2020

Nice!!! Merging.

@jywarren jywarren merged commit 896b192 into main Oct 6, 2020
@cesswairimu
Copy link
Collaborator

Fantastic 🎉

shubhangikori pushed a commit to shubhangikori/plots2 that referenced this pull request Oct 12, 2020
…fix users controller to prevent user creation in this scenario (publiclab#8467)

* test 'incomplete spamaway test does not create new user record'

* Update signup_flow_test.rb

* Update users_controller.rb

* Update users_controller.rb

* make blank field actually blank? otherwise 2 errors

* Update signup_flow_test.rb

* Update signup_flow_test.rb

* Update signup_flow_test.rb
alvesitalo pushed a commit to alvesitalo/plots2 that referenced this pull request Oct 14, 2020
…fix users controller to prevent user creation in this scenario (publiclab#8467)

* test 'incomplete spamaway test does not create new user record'

* Update signup_flow_test.rb

* Update users_controller.rb

* Update users_controller.rb

* make blank field actually blank? otherwise 2 errors

* Update signup_flow_test.rb

* Update signup_flow_test.rb

* Update signup_flow_test.rb
piyushswain pushed a commit to piyushswain/plots2 that referenced this pull request Oct 22, 2020
…fix users controller to prevent user creation in this scenario (publiclab#8467)

* test 'incomplete spamaway test does not create new user record'

* Update signup_flow_test.rb

* Update users_controller.rb

* Update users_controller.rb

* make blank field actually blank? otherwise 2 errors

* Update signup_flow_test.rb

* Update signup_flow_test.rb

* Update signup_flow_test.rb
manchere pushed a commit to manchere/plots2 that referenced this pull request Feb 13, 2021
…fix users controller to prevent user creation in this scenario (publiclab#8467)

* test 'incomplete spamaway test does not create new user record'

* Update signup_flow_test.rb

* Update users_controller.rb

* Update users_controller.rb

* make blank field actually blank? otherwise 2 errors

* Update signup_flow_test.rb

* Update signup_flow_test.rb

* Update signup_flow_test.rb
lagunasmel pushed a commit to lagunasmel/plots2 that referenced this pull request Mar 2, 2021
…fix users controller to prevent user creation in this scenario (publiclab#8467)

* test 'incomplete spamaway test does not create new user record'

* Update signup_flow_test.rb

* Update users_controller.rb

* Update users_controller.rb

* make blank field actually blank? otherwise 2 errors

* Update signup_flow_test.rb

* Update signup_flow_test.rb

* Update signup_flow_test.rb
reginaalyssa pushed a commit to reginaalyssa/plots2 that referenced this pull request Oct 16, 2021
…fix users controller to prevent user creation in this scenario (publiclab#8467)

* test 'incomplete spamaway test does not create new user record'

* Update signup_flow_test.rb

* Update users_controller.rb

* Update users_controller.rb

* make blank field actually blank? otherwise 2 errors

* Update signup_flow_test.rb

* Update signup_flow_test.rb

* Update signup_flow_test.rb
ampwang pushed a commit to ampwang/plots2 that referenced this pull request Oct 26, 2021
…fix users controller to prevent user creation in this scenario (publiclab#8467)

* test 'incomplete spamaway test does not create new user record'

* Update signup_flow_test.rb

* Update users_controller.rb

* Update users_controller.rb

* make blank field actually blank? otherwise 2 errors

* Update signup_flow_test.rb

* Update signup_flow_test.rb

* Update signup_flow_test.rb
billymoroney1 pushed a commit to billymoroney1/plots2 that referenced this pull request Dec 28, 2021
…fix users controller to prevent user creation in this scenario (publiclab#8467)

* test 'incomplete spamaway test does not create new user record'

* Update signup_flow_test.rb

* Update users_controller.rb

* Update users_controller.rb

* make blank field actually blank? otherwise 2 errors

* Update signup_flow_test.rb

* Update signup_flow_test.rb

* Update signup_flow_test.rb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants