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

pulibrary / orcid_princeton_hanami / 5de34809-9ff7-4539-99f9-19d4f8f7f3dc

25 Jun 2025 03:48PM UTC coverage: 95.536% (+0.2%) from 95.37%
5de34809-9ff7-4539-99f9-19d4f8f7f3dc

Pull #5

circleci

carolyncole
Adding the health page with the ORCID API Status
original code for the OCRID API Status came from https://github.com/pulibrary/orcid_princeton/blob/main/app/models/orcid_api_status.rb
We can no longer leverage https://github.com/lbeder/health-monitor-rails, so I generated a simple action to display the health status
Pull Request #5: Adding the health page with the ORCID API Status

110 of 115 new or added lines in 11 files covered. (95.65%)

428 of 448 relevant lines covered (95.54%)

1.7 hits per line

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

75.0
/spec/requests/health_spec.rb
1
# frozen_string_literal: true
2

3
RSpec.describe 'health', type: :request do
1✔
4
  it 'is ok' do
1✔
5
    get '/health'
1✔
6

NEW
7
    expect(last_response).to be_successful
×
NEW
8
    expect(last_response.content_type).to eq("text/html; charset=utf-8")
×
9

NEW
10
    expect(last_response.body).to include "Status: OK"
×
11
  end
12

13
  it 'is json' do
1✔
14
    get '/health.json'
1✔
15

16
    expect(last_response).to be_successful
1✔
17
    expect(last_response.content_type).to eq("application/json; charset=utf-8")
1✔
18

19
    response_body = JSON.parse(last_response.body)
1✔
20

21
    expect(response_body).to eq({ "status" => "OK", "results" => [{"message" => "", "name" => "ORCID", "status" => "OK"}]})
1✔
22
  end
23
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

© 2025 Coveralls, Inc