Skip to content

Commit

Permalink
Fix views specs
Browse files Browse the repository at this point in the history
  • Loading branch information
christinach committed Aug 13, 2024
1 parent 3164c17 commit aa64980
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 28 deletions.
6 changes: 3 additions & 3 deletions spec/views/locker_applications/edit.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

assert_select 'lux-input-select[name=?]', 'locker_application[status_at_application]'

assert_select 'input-text[name=?]', 'locker_application[department_at_application]'
assert_select 'lux-input-text[name=?]', 'locker_application[department_at_application]'

assert_select 'input[type=hidden][name=?]', 'locker_application[user_uid]'
end
Expand Down Expand Up @@ -64,10 +64,10 @@

assert_select 'lux-input-select[name=?]', 'locker_application[status_at_application]'

assert_select 'input-text[name=?]', 'locker_application[department_at_application]'
assert_select 'lux-input-text[name=?]', 'locker_application[department_at_application]'

assert_select 'input[type=hidden][name=?]', 'locker_application[user_uid]', count: 0
assert_select 'input-text[name=?]', 'locker_application[user_uid]'
assert_select 'lux-input-text[name=?]', 'locker_application[user_uid]'
end
end
end
Expand Down
6 changes: 3 additions & 3 deletions spec/views/locker_applications/new.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@

assert_select 'lux-input-select[name=?]', 'locker_application[status_at_application]', value: 'junior'

assert_select 'input-text[name=?]', 'locker_application[department_at_application]', value: 'department'
assert_select 'lux-input-text[name=?]', 'locker_application[department_at_application]', value: 'department'

assert_select 'input[type=hidden][name=?]', 'locker_application[user_uid]'
end
Expand All @@ -89,11 +89,11 @@

assert_select 'lux-input-select[name=?]', 'locker_application[status_at_application]', value: 'junior'

assert_select 'input-text[name=?]', 'locker_application[department_at_application]', value: 'department'
assert_select 'lux-input-text[name=?]', 'locker_application[department_at_application]', value: 'department'

assert_select 'input[type=hidden][name=?]', 'locker_application[user_uid]', count: 0

assert_select 'input-text[name=?]', 'locker_application[user_uid]', value: user.uid
assert_select 'lux-input-text[name=?]', 'locker_application[user_uid]', value: user.uid
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/views/locker_violations/edit.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
assert_select 'form[action=?][method=?]', locker_violation_path(@locker_violation), 'post' do
assert_select 'input[type=hidden][name=?]', 'locker_violation[user_id]'
assert_select 'input[type=hidden][name=?]', 'locker_violation[locker_id]'
assert_select 'input-text[name=?]', 'locker_violation[number_of_books]'
assert_select 'lux-input-text[name=?]', 'locker_violation[number_of_books]'
expect(rendered).not_to match(/There is no user currently assigned to the locker!/)
end
end
Expand Down
20 changes: 10 additions & 10 deletions spec/views/lockers/edit.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,25 +31,25 @@

assert_select 'input[type="checkbox"][name=?]', 'locker[accessible]'

assert_select 'input-text[name=?]', 'locker[location]'
assert_select 'lux-input-text[name=?]', 'locker[location]'

assert_select 'input-text[name=?]', 'locker[notes]'
assert_select 'lux-input-text[name=?]', 'locker[notes]'

assert_select 'input-text[name=?]', 'locker[combination]'
assert_select 'lux-input-text[name=?]', 'locker[combination]'

assert_select 'input-text[name=?]', 'locker[code]'
assert_select 'lux-input-text[name=?]', 'locker[code]'

assert_select 'input-text[name=?]', 'locker[tag]'
assert_select 'lux-input-text[name=?]', 'locker[tag]'

assert_select 'input-text[name=?]', 'locker[discs]'
assert_select 'lux-input-text[name=?]', 'locker[discs]'

assert_select 'input-text[name=?]', 'locker[clutch]'
assert_select 'lux-input-text[name=?]', 'locker[clutch]'

assert_select 'input-text[name=?]', 'locker[hubpos]'
assert_select 'lux-input-text[name=?]', 'locker[hubpos]'

assert_select 'input-text[name=?]', 'locker[key_number]'
assert_select 'lux-input-text[name=?]', 'locker[key_number]'

assert_select 'input-text[name=?]', 'locker[general_area]'
assert_select 'lux-input-text[name=?]', 'locker[general_area]'
end
end
end
20 changes: 10 additions & 10 deletions spec/views/lockers/new.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,31 +25,31 @@
render

assert_select 'form[action=?][method=?]', lockers_path, 'post' do
assert_select 'input-text[name=?]', 'locker[location]', value: 'location'
assert_select 'lux-input-text[name=?]', 'locker[location]', value: 'location'

assert_select 'lux-input-select[name=?]', 'locker[size]', value: '4'

assert_select 'lux-input-select[name=?]', 'locker[floor]', value: 'floor'

assert_select 'input[type="checkbox"][name=?]', 'locker[accessible]', value: false

assert_select 'input-text[name=?]', 'locker[notes]', value: 'notes'
assert_select 'lux-input-text[name=?]', 'locker[notes]', value: 'notes'

assert_select 'input-text[name=?]', 'locker[combination]', value: 'combination'
assert_select 'lux-input-text[name=?]', 'locker[combination]', value: 'combination'

assert_select 'input-text[name=?]', 'locker[code]', value: 'code'
assert_select 'lux-input-text[name=?]', 'locker[code]', value: 'code'

assert_select 'input-text[name=?]', 'locker[tag]', value: 'tag'
assert_select 'lux-input-text[name=?]', 'locker[tag]', value: 'tag'

assert_select 'input-text[name=?]', 'locker[discs]', value: 'discs'
assert_select 'lux-input-text[name=?]', 'locker[discs]', value: 'discs'

assert_select 'input-text[name=?]', 'locker[clutch]', value: 'clutch'
assert_select 'lux-input-text[name=?]', 'locker[clutch]', value: 'clutch'

assert_select 'input-text[name=?]', 'locker[hubpos]', value: 'hubpos'
assert_select 'lux-input-text[name=?]', 'locker[hubpos]', value: 'hubpos'

assert_select 'input-text[name=?]', 'locker[key_number]', value: 'num'
assert_select 'lux-input-text[name=?]', 'locker[key_number]', value: 'num'

assert_select 'input-text[name=?]', 'locker[general_area]', value: 'general_area'
assert_select 'lux-input-text[name=?]', 'locker[general_area]', value: 'general_area'
end
end
end
2 changes: 1 addition & 1 deletion spec/views/study_room_violations/edit.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
assert_select 'form[action=?][method=?]', study_room_violation_path(@study_room_violation), 'post' do
assert_select 'input[type=hidden][name=?]', 'study_room_violation[user_id]'
assert_select 'input[type=hidden][name=?]', 'study_room_violation[study_room_id]'
assert_select 'input-text[name=?]', 'study_room_violation[number_of_books]'
assert_select 'lux-input-text[name=?]', 'study_room_violation[number_of_books]'
expect(rendered).not_to match(/There is no user currently assigned to the study room!/)
end
end
Expand Down

0 comments on commit aa64980

Please sign in to comment.