Skip to content
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

test added something #1170

Closed
wants to merge 10 commits into from
2 changes: 1 addition & 1 deletion .env.development
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ EDS_CACHE_DIR=tmp/cache
EBSCO_SEARCH_URL="define EBSCO_SEARCH_URL"
FINDING_AIDS_SEARCH_URL="define FINDING_AIDS_SEARCH_URL"

GLOBAL_MESSAGE_URL=https://www.library.gov.au/catalogue-message
GLOBAL_MESSAGE_URL="define GLOBAL_MESSAGE_URL"

NATIONAL_LIBRARY_CARD_URL="https://www.library.gov.au/research/join-library"
ASK_LIBRARIAN_URL=https://www.library.gov.au/services/ask-librarian
Expand Down
2 changes: 1 addition & 1 deletion .env.staging
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ EDS_CACHE_DIR=tmp/cache
EBSCO_SEARCH_URL="define EBSCO_SEARCH_URL"
FINDING_AIDS_SEARCH_URL="define FINDING_AIDS_SEARCH_URL"

GLOBAL_MESSAGE_URL=https://www.library.gov.au/catalogue-message
GLOBAL_MESSAGE_URL="define GLOBAL_MESSAGE_URL"

NATIONAL_LIBRARY_CARD_URL="https://www.library.gov.au/research/join-library"
ASK_LIBRARIAN_URL=https://www.library.gov.au/services/ask-librarian
Expand Down
3 changes: 1 addition & 2 deletions .env.test
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ CATALOGUE_SEARCH_URL=http://test.host/catalog.json
FINDING_AIDS_SEARCH_URL=http://test.host/finding-aids/catalog.json
EBSCO_SEARCH_URL=https://search.ebscohost.com/login.aspx?authtype=ip,guest&groupid=main&profile=eds&direct=true

GLOBAL_MESSAGE_URL=https://www.library.gov.au/catalogue-message

GLOBAL_MESSAGE_URL="define GLOBAL_MESSAGE_URL"
NATIONAL_LIBRARY_CARD_URL="https://www.library.gov.au/research/join-library"
ASK_LIBRARIAN_URL=https://www.library.gov.au/services/ask-librarian

Expand Down
2 changes: 1 addition & 1 deletion app/services/catalogue_services_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class CatalogueServicesClient

def get_request_summary(folio_id:)
conn = setup_connection

# This is a change!
res = conn.get("/catalogue-services/folio/user/#{folio_id}/myRequests")
if res.status == 200
res.body.presence || DEFAULT_REQUEST_SUMMARY
Expand Down
6 changes: 6 additions & 0 deletions spec/files/global_messages/global_message.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[
{
"Title": "\u003Ca href=\"/node/1607\" hreflang=\"en\"\u003ECatalogue Message\u003C/a\u003E",
"body": "\u003Cp\u003EThe Library's summer opening hours are in place from Monday 23 December 2024 until Wednesday 1 January 2025 (inclusive). Before planning your visit, check our \u003Ca href=\"https://www.library.gov.au/visit/opening-hours\"\u003Eopening hours\u003C/a\u003E and \u003Ca href=\"https://www.library.gov.au/research/access-collection/temporary-changes-collection-access\"\u003Etemporary changes to collection access\u003C/a\u003E.\u003C/p\u003E"
}
]
11 changes: 11 additions & 0 deletions spec/support/webmock.rb
Original file line number Diff line number Diff line change
Expand Up @@ -279,5 +279,16 @@
}
)
.to_return(status: 200, body: email_2fa, headers: {})

# global_message = IO.read("spec/files/global_message.json")

# WebMock.stub_request(:get, "https://www.library.gov.au/catalogue-message")
# .with(
# headers: {
# "Accept" => "application/json",
# "Accept-Encoding" => "gzip;q=1.0,deflate;q=0.6,identity;q=0.3"
# }
# )
# .to_return(status: 200, body: global_message, headers: {})
end
end
Loading