Skip to content

Commit

Permalink
Write spec to test if default languages are created correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
RandomTannenbaum committed Jul 31, 2024
1 parent b5f1053 commit 027e2f9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions spec/models/person_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,12 @@
expect(person.errors[:shortname].first).to eq('ist zu lang (mehr als 100 Zeichen)')
end
end

context 'language_skills' do
it 'should automatically add default language on person creation' do
new_person = Person.new
expect(new_person.language_skills.length).to eq(3)
expect(new_person.language_skills.map(&:language)).to eql(%w[DE EN FR])
end
end
end

0 comments on commit 027e2f9

Please sign in to comment.