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

pulibrary / orangelight / df64ddc8-90c3-487d-9aa2-3b77b7bd21e5

14 Apr 2026 04:41PM UTC coverage: 0.454% (-95.0%) from 95.439%
df64ddc8-90c3-487d-9aa2-3b77b7bd21e5

push

circleci

web-flow
Remove Preservation Conservation work order type check (#5765)

Make sure description and enum is not an empty string

The specific issue appears for items in East Asian with bad data in Alma that fail the eligibility check for the Illiad service.
The problem was only revealed now after the changes in https://github.com/pulibrary/bibdata/pull/3178.

For the East Asian items the enum and description values are empty strings, so the specific  method returns that are present and not nil . The next Illiad eligibility check is the Preservation Conservation which does not exist anymore as a status label.
So the Illiad service eligibility check fails.

related to [#5755]

0 of 7 new or added lines in 4 files covered. (0.0%)

9770 existing lines in 228 files now uncovered.

46 of 10128 relevant lines covered (0.45%)

0.01 hits per line

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

0.0
/app/controllers/users/omniauth_callbacks_controller.rb
1
# frozen_string_literal: true
2

UNCOV
3
module Users
×
UNCOV
4
  class OmniauthCallbacksController < Devise::OmniauthCallbacksController
×
UNCOV
5
    def cas
×
UNCOV
6
      @user = User.from_cas access_token_in_request_params
×
7

UNCOV
8
      sign_in_and_redirect @user, event: :authentication # this will throw if @user is not activated
×
UNCOV
9
      if is_navigational_format?
×
UNCOV
10
        set_flash_message(:notice, :success, kind: 'from Princeton Central Authentication '\
×
UNCOV
11
                                                   'Service')
×
UNCOV
12
      end
×
UNCOV
13
    end
×
14

UNCOV
15
    def alma
×
UNCOV
16
      if Alma::User.authenticate(user_id: ERB::Util.url_encode(alma_params[:username]), password: alma_params[:password])
×
UNCOV
17
        @user ||= User.from_alma(access_token_in_request_params)
×
UNCOV
18
        @user.save
×
UNCOV
19
        sign_in_and_redirect @user, event: :authentication # this will throw if @user not activated
×
UNCOV
20
        set_flash_message(:notice, :success, kind: 'with alma account') if is_navigational_format?
×
UNCOV
21
      else
×
UNCOV
22
        set_flash_message(:error, :failure,
×
UNCOV
23
          reason: 'username or password did not match an alma account')
×
UNCOV
24
        redirect_to user_session_path(origin: omniauth_origin)
×
UNCOV
25
      end
×
UNCOV
26
    end
×
27

UNCOV
28
    private
×
29

UNCOV
30
      def omniauth_origin
×
UNCOV
31
        request.env['omniauth.origin']
×
UNCOV
32
      end
×
33

34
      # Accesses the access token passed within the request headers
35
      # @return [OmniAuth::AuthHash,nil] the access token
UNCOV
36
      def access_token_in_request_params
×
UNCOV
37
        request.env['omniauth.auth']
×
UNCOV
38
      end
×
39

UNCOV
40
      def alma_params
×
UNCOV
41
        params.permit(:username, :password)
×
UNCOV
42
      end
×
UNCOV
43
  end
×
UNCOV
44
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