• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mgmodell / devise_token_auth_multi_email / #2494

08 Apr 2026 02:16AM UTC coverage: 25.0% (-65.9%) from 90.879%
#2494

push

mgmodell
fixed test to work on my mac

395 of 1580 relevant lines covered (25.0%)

1.55 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

78.57
/app/controllers/devise_token_auth/token_validations_controller.rb
1
# frozen_string_literal: true
2

3
module DeviseTokenAuth
1✔
4
  class TokenValidationsController < DeviseTokenAuth::ApplicationController
1✔
5
    skip_before_action :assert_is_devise_resource!, only: [:validate_token]
1✔
6
    before_action :set_user_by_token, only: [:validate_token]
1✔
7

8
    def validate_token
1✔
9
      # @resource will have been set by set_user_by_token concern
10
      if @resource
2✔
11
        yield @resource if block_given?
2✔
12
        render_validate_token_success
2✔
13
      else
14
        render_validate_token_error
×
15
      end
16
    end
17

18
    protected
1✔
19

20
    def render_validate_token_success
1✔
21
      render json: {
×
22
        success: true,
23
        data: resource_data(resource_json: @resource.token_validation_response)
24
      }
25
    end
26

27
    def render_validate_token_error
1✔
28
      render_error(401, I18n.t('devise_token_auth.token_validations.invalid'))
×
29
    end
30
  end
31
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc