Skip to content

Commit

Permalink
begin with testing
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcEgliP committed Feb 24, 2024
1 parent 9e4a76a commit f483f73
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions spec/features/skills_controller_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
require 'rails_helper'

describe :people do
describe 'People Search', type: :feature, js: true do

it 'can edit skill in table ' do
visit skills_path

# list = Skill.pluck(:title).sort
# within 'section[data-controller="dropdown"]' do
# expect(page).to have_select('person_id', options: list, selected: list.first)
# end
end

it 'redirects to the selected person on change' do
visit people_path
bob = skills(:bash)

within 'section[data-controller="dropdown"]' do
select bob.name, from: 'person_id'
end

expect(page).to have_current_path(person_path(bob))
expect(page).to have_select('person_id', selected: bob.name)
end
end
end

0 comments on commit f483f73

Please sign in to comment.