Skip to content

Commit 6e2caca

Browse files
committed
Fix and enhance tests aswell as json fixtures
1 parent faa0a37 commit 6e2caca

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

spec/fixtures/files/json/wally.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,22 @@
66
"shortname": "CAL",
77
"firstname": "Changed Wally",
88
"lastname": "Allround",
9-
"full_name": "Changed Wally Allround",
109
"email": "[email protected]",
1110
"marital_status": "single",
1211
"nationalities": [
1312
"DE", "DK"
1413
],
1514
"graduation": "Quarter-Stack Developer",
1615
"department_shortname": "SYS",
17-
"employment_roles2": [],
16+
"employment_roles": [
17+
{
18+
"name": "Newest employment role",
19+
"percent": 100.0
20+
}
21+
],
1822
"is_employed": false,
19-
"birthdate": "1.1.2000",
20-
"location": "Basel"
23+
"birthday": "1.1.2000",
24+
"city": "Basel"
2125
}
2226
}
2327
}

spec/requests/people_employees_spec.rb

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,15 @@
2525
expect(person_wally.email).to eq('[email protected]')
2626

2727
get "/de/people/#{person_wally.id}"
28-
expect(response).to render_template(:show)
2928

3029
person_wally.reload
3130
expect(person_wally.name).to eq('Changed Wally Allround')
3231
expect(person_wally.shortname).to eq('CAL')
3332
expect(person_wally.email).to eq('[email protected]')
3433
expect(person_wally.marital_status).to eq('single')
3534
expect(person_wally.title).to eq('Quarter-Stack Developer')
36-
# Can be commented in when the updated PTime API has been released and the mapping in the 'people_employees.rb' has been fixed
37-
38-
# expect(person_wally.birthdate.to_date).to eq(Date.parse('1.1.2000'))
39-
# expect(person_wally.location).to eq('Basel')
35+
expect(person_wally.birthdate.to_date).to eq(Date.parse('1.1.2000'))
36+
expect(person_wally.location).to eq('Basel')
4037
expect(person_wally.nationality).to eq('DE')
4138
expect(person_wally.nationality2).to eq('DK')
4239
end
@@ -57,10 +54,8 @@
5754
expect(new_wally.email).to eq('[email protected]')
5855
expect(new_wally.marital_status).to eq('single')
5956
expect(new_wally.title).to eq('Quarter-Stack Developer')
60-
# Can be commented in when the updated PTime API has been released and the mapping in the 'people_employees.rb' has been fixed
61-
62-
# expect(new_wally.birthdate).to eq('1.1.2000')
63-
# expect(new_wally.location).to eq('Basel')
57+
expect(new_wally.birthdate).to eq('1.1.2000')
58+
expect(new_wally.location).to eq('Basel')
6459
expect(new_wally.nationality).to eq('DE')
6560
expect(new_wally.nationality2).to eq('DK')
6661
end

0 commit comments

Comments
 (0)