Fix syntax errors

This commit is contained in:
Jesse C. Fisher 2021-07-24 00:34:18 -07:00
parent 69ce3f6b4c
commit 501972870d
4 changed files with 12 additions and 13 deletions

View File

@ -40,7 +40,7 @@ class Users::RegistrationsController < Devise::RegistrationsController
# If you have extra params to permit, append them to the sanitizer. # If you have extra params to permit, append them to the sanitizer.
def configure_sign_up_params def configure_sign_up_params
devise_parameter_sanitizer.for(:sign_up) << :soft_token devise_parameter_sanitizer.permit(:sign_up, keys: [:soft_token])
end end
# If you have extra params to permit, append them to the sanitizer. # If you have extra params to permit, append them to the sanitizer.

View File

@ -8,8 +8,8 @@ module DevisePermittedParameters
protected protected
def configure_permitted_parameters def configure_permitted_parameters
devise_parameter_sanitizer.for(:sign_up) << :name devise_parameter_sanitizer.permit(:sign_up, keys: [:name])
devise_parameter_sanitizer.for(:account_update) << :name devise_parameter_sanitizer.permit(:account_update, keys: [:name])
end end
end end

View File

@ -13,18 +13,18 @@ feature 'Table show', :devise do
# Given I am not signed in # Given I am not signed in
# When I visit a table # When I visit a table
# Then I see the table attributes # Then I see the table attributes
scenario 'visitor can see the table', js: true do scenario 'visitor can see the table' do
expect(page).to have_selector "#table-#{@table.id} > h1", @table.title expect(page).to have_text @table.title
end end
scenario 'visitor can see the seats', js: true do scenario 'visitor can see the seats' do
#TODO: Race condition exists without have_content #TODO: Race condition exists without have_content
expect(page).to have_content "Sit" expect(page).to have_button "Sit"
@seat_count = page.find_all(".seat").length @seat_count = page.find_all(".seat").length
expect(@seat_count).to eq @table.seats.count expect(@seat_count).to eq @table.seats.count
end end
scenario 'visitor can see the current game', js: true do scenario 'visitor can see the current game' do
#TODO: Write a better expectation #TODO: Write a better expectation
expect(page).to have_content "Hand to beat" expect(page).to have_content "Hand to beat"
end end
@ -43,14 +43,14 @@ feature 'Table show', :devise do
# Given I am signed in # Given I am signed in
# When I click a table # When I click a table
# Then I see the table attributes # Then I see the table attributes
scenario 'user can see the table', js: true do scenario 'user can see the table' do
expect(page).to have_content "Sign out" expect(page).to have_content "Sign out"
expect(page).to have_selector "#table-#{@table.id} > h1", @table.title expect(page).to have_content @table.title
expect(current_path).to eq table_path(@table) expect(current_path).to eq table_path(@table)
end end
scenario 'user can see the current game', js: true do scenario 'user can see the current game' do
expect(page).to have_content "Sit" expect(page).to have_button "Sit"
end end
end end

View File

@ -11,7 +11,6 @@ module Features
def signin(email, password) def signin(email, password)
visit new_user_session_path visit new_user_session_path
sleep 2 sleep 2
page.save_screenshot
fill_in 'Email', with: email fill_in 'Email', with: email
fill_in 'Password', with: password fill_in 'Password', with: password
click_button 'Log in' click_button 'Log in'