-
-
Notifications
You must be signed in to change notification settings - Fork 499
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
3555 address skipped tests #3606
Conversation
unused helper `after_sign_in_path_for`. It was supposed to override devise's method `after_sign_in_path_for`. However, to make it acutally wotk, it would need to be defined directly in ApplicationController or the AppliactionHelper would need to be directly included in the ApplicationController. So in that form, it was only available through `helpers.after_sign_in_path_for` and it was never invoked.
def after_sign_in_path_for(resource) | ||
# default to the stored location | ||
if resource.is_a?(User) && resource.organization.present? | ||
# go to user's dashboard | ||
dashboard_path(organization_id: resource.organization.id) | ||
else | ||
stored_location_for(resource) || new_organization_path | ||
# send new users to organization creation page | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was the dead code. It didn't actually override devise's method since it was available in ApplicationController as helpers.after_sign_in_path_for
and was never invoked. To make it be executed, we would need to either define the method directly in ApplicationController or just include the AppliactionHelper in the ApplicationController.
…into 3555_address_skipped_tests
…into 3555_address_skipped_tests
@@ -54,9 +54,8 @@ | |||
# These are scopes that are expressly to integrate with Filterable | |||
context "filters >" do | |||
it "->barcodeable_id shows only barcodes for a specific barcodeable_id" do | |||
skip "TODO: this test can be intermittent see https://travis-ci.org/rubyforgood/diaper/builds/624661379?" | |||
global_barcode_item # initial creation | |||
create(:global_barcode_item) # create a null case |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
by default this factory takes BaseItem.all.sample
as barcodeable
, so that was the reason for the flakiness. It is enough to explicitly pass the base_item to fix it.
@Haradd this looks amazing! It seems like at least one test is failing though :) |
Thanks for the review! It should pass now. Let's see :) |
Looks good! Thanks! |
Resolves #3555
Description
The PR adds missing tests and fixes broken ones.
Additionally, it removes some dead code:
after_sign_in_path_for
method in ApplicationHelperType of change