-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4441 from pulibrary/valid_patron_groups_in_tests
Change to valid patron_group for tests
- Loading branch information
Showing
11 changed files
with
17 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,7 +50,7 @@ | |
let(:user_info) do | ||
{ | ||
"patron_id" => "12345", | ||
"patron_group" => "staff", | ||
"patron_group" => "REG", | ||
"user_name" => "Foo Request", | ||
"user_barcode" => "22101007797777", | ||
"email" => "[email protected]" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -991,7 +991,7 @@ def service_error_email | |
bib: | ||
} | ||
submission = Requests::Generic.new(params) | ||
submission.errors << { :reply_text => "Can not create hold", :create_hold => { note: "Hold can not be created" }, "id" => "10574699", "title" => "Mefisto : rivista di medicina, filosofia, storia", "author" => "", "user_name" => "Foo Request", "user_last_name" => "Request", "user_barcode" => "0000000000", "patron_id" => "00000", "patron_group" => "staff", "email" => "[email protected]", "source" => "pulsearch" } | ||
submission.errors << { :reply_text => "Can not create hold", :create_hold => { note: "Hold can not be created" }, "id" => "10574699", "title" => "Mefisto : rivista di medicina, filosofia, storia", "author" => "", "user_name" => "Foo Request", "user_last_name" => "Request", "user_barcode" => "0000000000", "patron_id" => "00000", "patron_group" => "REG", "email" => "[email protected]", "source" => "pulsearch" } | ||
Requests::RequestMailer.service_error_email([submission]) | ||
end | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
let(:user) { FactoryBot.build(:user) } | ||
let(:valid_patron) do | ||
{ "netid" => "foo", "first_name" => "Foo", "last_name" => "Request", | ||
"barcode" => "22101007797777", "university_id" => "9999999", "patron_group" => "staff", | ||
"barcode" => "22101007797777", "university_id" => "9999999", "patron_group" => "REG", | ||
"patron_id" => "99999", "active_email" => "[email protected]" }.with_indifferent_access | ||
end | ||
let(:patron) do | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,7 @@ | |
let(:user) { FactoryBot.build(:user) } | ||
let(:valid_patron) do | ||
{ "netid" => "foo", "first_name" => "Foo", "last_name" => "Request", "barcode" => "22101007797777", | ||
"university_id" => "9999999", "patron_group" => "staff", "patron_id" => "99999", "active_email" => "[email protected]" }.with_indifferent_access | ||
"university_id" => "9999999", "patron_group" => "REG", "patron_id" => "99999", "active_email" => "[email protected]" }.with_indifferent_access | ||
end | ||
let(:patron) do | ||
Requests::Patron.new(user:, patron_hash: valid_patron) | ||
|
@@ -150,7 +150,7 @@ | |
let(:user) { FactoryBot.build(:user) } | ||
let(:valid_patron) do | ||
{ "netid" => "foo", "first_name" => "Foo", "last_name" => "Request", "barcode" => "22101007797777", | ||
"university_id" => "9999999", "patron_group" => "staff", "patron_id" => "99999", "active_email" => "[email protected]" }.with_indifferent_access | ||
"university_id" => "9999999", "patron_group" => "REG", "patron_id" => "99999", "active_email" => "[email protected]" }.with_indifferent_access | ||
end | ||
let(:patron) do | ||
Requests::Patron.new(user:, patron_hash: valid_patron) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
let(:user) { FactoryBot.build(:user) } | ||
let(:test_patron) do | ||
{ "netid" => "foo", "first_name" => "Foo", "last_name" => "Request", | ||
"barcode" => "22101007797777", "university_id" => "9999999", "patron_group" => "staff", | ||
"barcode" => "22101007797777", "university_id" => "9999999", "patron_group" => "REG", | ||
"patron_id" => "99999", "active_email" => "[email protected]", | ||
ldap: }.with_indifferent_access | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
let(:user) { FactoryBot.build(:user) } | ||
let(:valid_patron) do | ||
{ "netid" => "foo", "first_name" => "Foo", "last_name" => "Request", | ||
"barcode" => "22101007797777", "university_id" => "9999999", "patron_group" => "staff", | ||
"barcode" => "22101007797777", "university_id" => "9999999", "patron_group" => "REG", | ||
"patron_id" => "99999", "active_email" => "[email protected]" }.with_indifferent_access | ||
end | ||
let(:patron) do | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -891,7 +891,7 @@ | |
context "Marquand item in Clancy" do | ||
let(:valid_patron) do | ||
{ "netid" => "foo", "first_name" => "Foo", "last_name" => "Request", | ||
"barcode" => "22101007797777", "university_id" => "9999999", "patron_group" => "staff", | ||
"barcode" => "22101007797777", "university_id" => "9999999", "patron_group" => "REG", | ||
"patron_id" => "99999", "active_email" => "[email protected]" }.with_indifferent_access | ||
end | ||
let(:location_code) { 'scsbnypl' } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
describe Requests::IlliadPatron, type: :controller, requests: true, patrons: true do | ||
let(:valid_patron) do | ||
{ "netid" => "foo", "first_name" => "Foo", "last_name" => "Request", | ||
"barcode" => "22101007797777", "university_id" => "9999999", "patron_group" => "staff", | ||
"barcode" => "22101007797777", "university_id" => "9999999", "patron_group" => "REG", | ||
"patron_id" => "99999", "active_email" => "[email protected]", "ldap" => ldap_data }.with_indifferent_access | ||
end | ||
let(:ldap_data) { { uid: 'foo', department: 'Library - Information Technology', address: 'Firestone Library$Library Information Technology', telephone: '123-456-7890', surname: 'Doe', givenname: 'Joe', email: '[email protected]', pustatus: 'fac', status: 'faculty' }.with_indifferent_access } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
let(:user) { FactoryBot.build(:user) } | ||
let(:valid_patron) do | ||
{ "netid" => "foo", "first_name" => "Foo", "last_name" => "Request", | ||
"barcode" => "22101007797777", "university_id" => "9999999", "patron_group" => "staff", | ||
"barcode" => "22101007797777", "university_id" => "9999999", "patron_group" => "REG", | ||
"patron_id" => "99999", "active_email" => "[email protected]", | ||
ldap: }.with_indifferent_access | ||
end | ||
|
@@ -786,7 +786,7 @@ | |
let(:stubbed_questions) { default_stubbed_questions.merge(item_data?: false, circulates?: false, services: ["on_shelf"], recap_edd?: false, scsb_in_library_use?: false, ill_eligible?: true, patron:, on_order?: false, in_process?: false, eligible_for_library_services?: false, ask_me?: false, library_code: 'abc', aeon?: false) } | ||
let(:valid_patron) do | ||
{ "netid" => "foo", "first_name" => "Foo", "last_name" => "Request", | ||
"university_id" => "9999999", "patron_group" => "staff", | ||
"university_id" => "9999999", "patron_group" => "REG", | ||
"patron_id" => "99999", "active_email" => "[email protected]", | ||
ldap: }.with_indifferent_access | ||
end | ||
|
@@ -807,7 +807,7 @@ | |
let(:stubbed_questions) { default_stubbed_questions.merge(item_data?: false, circulates?: false, services: ["on_shelf"], recap_edd?: false, scsb_in_library_use?: false, ill_eligible?: true, patron:, on_order?: false, in_process?: true, eligible_for_library_services?: false, ask_me?: false, library_code: 'abc', aeon?: false) } | ||
let(:valid_patron) do | ||
{ "netid" => "foo", "first_name" => "Foo", "last_name" => "Request", | ||
"university_id" => "9999999", "patron_group" => "staff", | ||
"university_id" => "9999999", "patron_group" => "REG", | ||
"patron_id" => "99999", "active_email" => "[email protected]", | ||
ldap: }.with_indifferent_access | ||
end | ||
|
@@ -827,7 +827,7 @@ | |
let(:stubbed_questions) { default_stubbed_questions.merge(item_data?: false, circulates?: false, services: ["on_shelf"], recap_edd?: false, scsb_in_library_use?: false, ill_eligible?: true, patron:, on_order?: true, eligible_for_library_services?: false, ask_me?: false, library_code: 'abc', aeon?: false) } | ||
let(:valid_patron) do | ||
{ "netid" => "foo", "first_name" => "Foo", "last_name" => "Request", | ||
"university_id" => "9999999", "patron_group" => "staff", | ||
"university_id" => "9999999", "patron_group" => "REG", | ||
"patron_id" => "99999", "active_email" => "[email protected]", | ||
ldap: }.with_indifferent_access | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
let(:user) { FactoryBot.build(:user) } | ||
let(:valid_patron) do | ||
{ "netid" => "foo", "first_name" => "Foo", "last_name" => "Request", | ||
"barcode" => "22101007797777", "university_id" => "9999999", "patron_group" => "staff", | ||
"barcode" => "22101007797777", "university_id" => "9999999", "patron_group" => "REG", | ||
"patron_id" => "99999", "active_email" => "[email protected]", | ||
ldap: { netid: "foo", department: "Test", address: "Box 1234", telephone: nil, givenname: "Foo", surname: "Request", | ||
email: "[email protected]", status: "staff", pustatus: "stf", universityid: "9999999", title: nil } }.with_indifferent_access | ||
|
@@ -590,7 +590,7 @@ | |
# user authentication tests | ||
context 'When a princeton user with NetID visits the site' do | ||
let(:valid_patron) do | ||
{ "netid" => "foo", "first_name" => "Foo", "last_name" => "Request", "barcode" => "22101007797777", "university_id" => "9999999", "patron_group" => "staff", | ||
{ "netid" => "foo", "first_name" => "Foo", "last_name" => "Request", "barcode" => "22101007797777", "university_id" => "9999999", "patron_group" => "REG", | ||
"patron_id" => "99999", "active_email" => "[email protected]" }.with_indifferent_access | ||
end | ||
let(:patron) do | ||
|
@@ -656,7 +656,7 @@ | |
|
||
context 'When a barcode only user visits the site' do | ||
let(:valid_patron) do | ||
{ "netid" => "foo", "first_name" => "Foo", "last_name" => "Request", "barcode" => "22101007797777", "university_id" => "9999999", "patron_group" => "staff", | ||
{ "netid" => "foo", "first_name" => "Foo", "last_name" => "Request", "barcode" => "22101007797777", "university_id" => "9999999", "patron_group" => "REG", | ||
"patron_id" => "99999", "active_email" => "[email protected]" }.with_indifferent_access | ||
end | ||
let(:patron) do | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
describe Requests::Submission, requests: true do | ||
let(:valid_patron) do | ||
{ "netid" => "foo", "first_name" => "Foo", "last_name" => "Request", | ||
"barcode" => "22101007797777", "university_id" => "9999999", "patron_group" => "staff", | ||
"barcode" => "22101007797777", "university_id" => "9999999", "patron_group" => "REG", | ||
"patron_id" => "99999", "active_email" => "[email protected]" }.with_indifferent_access | ||
end | ||
let(:user_info) do | ||
|