Commit 0699d796 authored by Hussain Kashef's avatar Hussain Kashef

fixed the class method that was not returning anything if there was no mothertongue

parent 6c2ba3bf
Pipeline #51457 passed with stage
in 39 minutes and 13 seconds
......@@ -21,7 +21,6 @@ class LanguageSkill < ApplicationRecord
.map { |key, lang| [lang, key.to_s] }.sort
end
def native_language
native_languages.first || LanguageSkill.new
end
......@@ -32,7 +31,7 @@ class LanguageSkill < ApplicationRecord
end
def native_and_human_readable
german_first.native_languages.map(&:full_language_skills)
german_first.map(&:full_language_skills)
end
end
......
......@@ -203,7 +203,7 @@ class ClientsTest < ApplicationSystemTestCase
create :client, language_skills: [
create(:language_skill, language: 'DE', level: 'good'),
create(:language_skill, language: 'IT', level: 'native_speaker'),
create(:language_skill, language: 'FR', level: 'fluent')
create(:language_skill, language: 'FR', level: 'good')
]
login_as @superadmin
visit clients_path
......
Markdown is supported
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