Plots2: Add test to protect login bug solution

Created on 8 Apr 2019  路  5Comments  路  Source: publiclab/plots2

https://github.com/publiclab/plots2/pull/5410 was a great solution for the bug identified in #5405, but I'd like to write a test to prevent this from happening again. It could be a system test:

5316

Or it could be an integration test, something like this:

https://github.com/publiclab/plots2/blob/3bef69c5927d91373d76049303b2f531c62814e2/test/integration/login_flow_test.rb#L15-L26

Basically we want to try logging in, like here:

https://github.com/publiclab/plots2/blob/master/test/integration/login_flow_test.rb#L22

but with the wrong password, then enter the right password, and show that it really redirects to the dashboard as the solution in #5410 changed.

For anyone looking to learn more about testing, this is a good one!!!

Ruby help wanted testing

Most helpful comment

@jywarren Sure! I am very glad to help.

All 5 comments

@40404notfound would you be interested in this one at all? We'd love your help! Thanks again!

@jywarren Sure! I am very glad to help.

@40404notfound how's the work going in on this one? Just checking in in case you are stuck!

@IshaGupta18 Thanks a lot ! I just had an extremely busy week so I had to postpone my plan in fixing this issue. Don't worry. I am definitely going to fix this in a few days.

Hi, @jywarren @IshaGupta18 , I just added a test case in #5579 for exposing the bug in #5410. The new test should be able to distinguish a buggy one from a correct one.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

first-timers[bot] picture first-timers[bot]  路  3Comments

keshavsethi picture keshavsethi  路  3Comments

milaaraujo picture milaaraujo  路  3Comments

noi5e picture noi5e  路  3Comments

milaaraujo picture milaaraujo  路  3Comments