Commit 548035e5 authored by Jiri Strojil's avatar Jiri Strojil 💬
Browse files

Merge branch 'fix/unknown-permit' into 'develop'

fix: unknown permit renamed

See merge request !1089
parents b43a6650 e78c4954
Pipeline #105602 passed with stages
in 13 minutes and 25 seconds
......@@ -11,7 +11,7 @@ class Client < ApplicationRecord
GENDER_REQUESTS = [:no_matter, :man, :woman].freeze
AGE_REQUESTS = [:age_no_matter, :age_young, :age_middle, :age_old].freeze
PERMITS = [:N, :B, :'B-FL', :'F-FL', :'F-A', :C, :CH, :U].freeze
PERMITS = [:N, :B, :'B-FL', :'F-FL', :'F-A', :C, :CH, 'Unbekannt'].freeze
SALUTATIONS = (Volunteer::SALUTATIONS + [:family]).freeze
SALUTATION_GENDER_MAP = Volunteer::SALUTATION_GENDER_MAP.merge(family: :family).freeze
AVAILABILITY = [:flexible, :morning, :afternoon, :evening, :workday, :weekend].freeze
......
class AddUnknownPermitToClients < ActiveRecord::Migration[6.0]
def up
Client.where(permit: ['', nil]).update_all(permit: :U)
Client.where(permit: ['', nil]).update_all(permit: 'Unbekannt')
end
end
......@@ -3,7 +3,7 @@ FactoryBot.define do
user
contact
salutation { ['mr', 'mrs'].sample }
permit { :U }
permit { 'Unbekannt' }
trait :zuerich do
association :contact, factory: :contact_zuerich
......
......@@ -52,7 +52,7 @@ class ClientNotificationsTest < ApplicationSystemTestCase
fill_in 'Mailadresse', with: 'gurke@gurkenmail.com'
fill_in 'Telefonnummer', with: '0123456789', match: :first
within '.client_permit' do
choose 'U'
choose 'Unbekannt'
end
within '#languages' do
choose('Wenig')
......@@ -76,7 +76,7 @@ class ClientNotificationsTest < ApplicationSystemTestCase
fill_in 'Mailadresse', with: 'gurke@gurkenmail.com'
fill_in 'Telefonnummer', with: '0123456789', match: :first
within '.client_permit' do
choose 'U'
choose 'Unbekannt'
end
within '#languages' do
choose('Wenig')
......@@ -107,7 +107,7 @@ class ClientNotificationsTest < ApplicationSystemTestCase
fill_in 'Mailadresse', with: 'gurke@gurkenmail.com'
fill_in 'Telefonnummer', with: '0123456789', match: :first
within '.client_permit' do
choose 'U'
choose 'Unbekannt'
end
within '#languages' do
choose('Wenig')
......
......@@ -27,7 +27,7 @@ class ClientsTest < ApplicationSystemTestCase
fill_in 'Telefonnummer', with: '0123456789', match: :first
fill_in 'Telefonnummer 2', with: '0123456789'
within '.client_permit' do
choose 'U'
choose 'Unbekannt'
end
within '#languages' do
choose('Gut')
......@@ -75,7 +75,7 @@ class ClientsTest < ApplicationSystemTestCase
fill_in 'Ort', with: 'Zürich'
fill_in 'Mailadresse', with: FFaker::Internet.unique.email
within '.client_permit' do
choose 'U'
choose 'Unbekannt'
end
within '#languages' do
choose('Gut')
......@@ -101,7 +101,7 @@ class ClientsTest < ApplicationSystemTestCase
fill_in 'PLZ', with: '8002'
fill_in 'Ort', with: 'Zürich'
within '.client_permit' do
choose 'U'
choose 'Unbekannt'
end
within '#languages' do
choose('Gut')
......@@ -292,7 +292,7 @@ class ClientsTest < ApplicationSystemTestCase
visit new_client_path
within '.client_permit' do
choose 'U'
choose 'Unbekannt'
end
within '#languages' do
choose('Wenig')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment