Skip to content

Commit

Permalink
Updating for additional valid users (#1159)
Browse files Browse the repository at this point in the history
  • Loading branch information
carolyncole authored Dec 20, 2024
1 parent bf1be32 commit 606e784
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 9 deletions.
4 changes: 3 additions & 1 deletion data/user_registration_list_development.csv
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ aguess,,,,,TRUE,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
bk5523,,,,,TRUE,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
cbrangwy,,,,,TRUE,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
cpena,,,,,TRUE,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
curt,,,,,TRUE,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
dgraves,,,,,TRUE,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
ekolemen,,,,,TRUE,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
jakey,,,,,TRUE,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
Expand Down Expand Up @@ -91,3 +90,6 @@ mfh2,,,,,,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
mg9443,,,,,,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
nc1514,,,,,,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
sa3275,,,,,,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
dd7,,Dominique,Davis,Dominique Davis,,,,,TRUE,2024-12-10,Matt Chandler,TigerData Staff
hwcowles,,Wind,Cowles,Wind Cowles,TRUE,TRUE,,,TRUE,2024-12-19,Matt Chandler,TigerData Staff
curt,,Curt,Hillegas,Curt Hillegas,TRUE,,,TRUE,TRUE,2024-12-19,Matt Chandler,TigerData Staff
4 changes: 3 additions & 1 deletion data/user_registration_list_production.csv
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ aguess,,,,,TRUE,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
bk5523,,,,,TRUE,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
cbrangwy,,,,,TRUE,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
cpena,,,,,TRUE,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
curt,,,,,TRUE,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
dgraves,,,,,TRUE,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
ekolemen,,,,,TRUE,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
jakey,,,,,TRUE,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
Expand Down Expand Up @@ -91,3 +90,6 @@ mfh2,,,,,,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
mg9443,,,,,,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
nc1514,,,,,,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
sa3275,,,,,,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
dd7,,Dominique,Davis,Dominique Davis,,,,,TRUE,2024-12-10,Matt Chandler,TigerData Staff
hwcowles,,Wind,Cowles,Wind Cowles,TRUE,TRUE,,,TRUE,2024-12-19,Matt Chandler,TigerData Staff
curt,,Curt,Hillegas,Curt Hillegas,TRUE,,,TRUE,TRUE,2024-12-19,Matt Chandler,TigerData Staff
4 changes: 3 additions & 1 deletion data/user_registration_list_qa.csv
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ aguess,,,,,TRUE,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
bk5523,,,,,TRUE,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
cbrangwy,,,,,TRUE,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
cpena,,,,,TRUE,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
curt,,,,,TRUE,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
dgraves,,,,,TRUE,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
ekolemen,,,,,TRUE,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
jakey,,,,,TRUE,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
Expand Down Expand Up @@ -91,3 +90,6 @@ mfh2,,,,,,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
mg9443,,,,,,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
nc1514,,,,,,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
sa3275,,,,,,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
dd7,,Dominique,Davis,Dominique Davis,,,,,TRUE,2024-12-10,Matt Chandler,TigerData Staff
hwcowles,,Wind,Cowles,Wind Cowles,TRUE,TRUE,,,TRUE,2024-12-19,Matt Chandler,TigerData Staff
curt,,Curt,Hillegas,Curt Hillegas,TRUE,,,TRUE,TRUE,2024-12-19,Matt Chandler,TigerData Staff
4 changes: 3 additions & 1 deletion data/user_registration_list_staging.csv
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ aguess,,,,,TRUE,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
bk5523,,,,,TRUE,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
cbrangwy,,,,,TRUE,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
cpena,,,,,TRUE,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
curt,,,,,TRUE,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
dgraves,,,,,TRUE,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
ekolemen,,,,,TRUE,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
jakey,,,,,TRUE,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
Expand Down Expand Up @@ -91,3 +90,6 @@ mfh2,,,,,,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
mg9443,,,,,,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
nc1514,,,,,,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
sa3275,,,,,,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
dd7,,Dominique,Davis,Dominique Davis,,,,,TRUE,2024-12-10,Matt Chandler,TigerData Staff
hwcowles,,Wind,Cowles,Wind Cowles,TRUE,TRUE,,,TRUE,2024-12-19,Matt Chandler,TigerData Staff
curt,,Curt,Hillegas,Curt Hillegas,TRUE,,,TRUE,TRUE,2024-12-19,Matt Chandler,TigerData Staff
4 changes: 3 additions & 1 deletion data/user_registration_list_test.csv
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ aguess,,,,,TRUE,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
bk5523,,,,,TRUE,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
cbrangwy,,,,,TRUE,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
cpena,,,,,TRUE,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
curt,,,,,TRUE,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
dgraves,,,,,TRUE,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
ekolemen,,,,,TRUE,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
jakey,,,,,TRUE,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
Expand Down Expand Up @@ -91,3 +90,6 @@ mfh2,,,,,,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
mg9443,,,,,,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
nc1514,,,,,,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
sa3275,,,,,,,,,,2024-11-26,Matt Chandler,Capacity Early Adopter
dd7,,Dominique,Davis,Dominique Davis,,,,,TRUE,2024-12-10,Matt Chandler,TigerData Staff
hwcowles,,Wind,Cowles,Wind Cowles,TRUE,TRUE,,,TRUE,2024-12-19,Matt Chandler,TigerData Staff
curt,,Curt,Hillegas,Curt Hillegas,TRUE,,,TRUE,TRUE,2024-12-19,Matt Chandler,TigerData Staff
8 changes: 4 additions & 4 deletions spec/models/user_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,26 +87,26 @@
it "creates a new user for every line in the file" do
expect(User.count).to eq 0
User.load_registration_list
expect(User.count).to eq 92
expect(User.count).to eq 94
end
it "does not create a user if they exist already" do
User.create(uid: "mjc12", family_name: "Chandler", display_name: "Matt Chandler", email: "mjc12@princeton.edu")
expect(User.count).to eq 1
User.load_registration_list
expect(User.count).to eq 92
expect(User.count).to eq 94
user = User.find_by(uid: "mjc12")
# If we don't say that this is a cas user, they won't be able to log in with CAS
expect(user.provider).to eq "cas"
end
it "updates a name if the name is updated in the spreadsheet" do
User.load_registration_list
expect(User.count).to eq 92
expect(User.count).to eq 94
blank_name_user = User.find_by(uid: "munan")
expect(blank_name_user.family_name).to be_nil
expect(blank_name_user.display_name).to be_nil
allow(User).to receive(:csv_data).and_return(updated_csv_data)
User.load_registration_list
expect(User.count).to eq 92
expect(User.count).to eq 94
updated_name_user = User.find_by(uid: "munan")
expect(updated_name_user.family_name).to eq "Nøme"
expect(updated_name_user.display_name).to eq "Fáké Nøme"
Expand Down

0 comments on commit 606e784

Please sign in to comment.