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.
def configure_sign_up_params
devise_parameter_sanitizer.for(:sign_up) << :soft_token
devise_parameter_sanitizer.permit(:sign_up, keys: [:soft_token])
end
# If you have extra params to permit, append them to the sanitizer.

View File

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

View File

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

View File

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