adherent 0.3.12 → 0.3.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,8 +12,7 @@ describe 'Coord', :type => :model do
12
12
  it 'les coordonnées sont rattachées à un membre' do
13
13
  @c = Adherent::Coord.new()
14
14
  @c.valid?
15
- expect(@c.errors[:member_id].size).to eq(1)
16
-
15
+ expect(@c.errors[:member_id].size).to eq(1)
17
16
  end
18
17
 
19
18
  it 'coord est dépendant du membre' do
@@ -26,4 +25,16 @@ describe 'Coord', :type => :model do
26
25
  expect{adherent_members(:Durand).destroy}.
27
26
  to change{Adherent::Coord.count}.by -1
28
27
  end
28
+
29
+ it 'les données sont nettoyées avant le validation' do
30
+ c = @m.build_coord(address:"Une adresse avec un blanc en fin ")
31
+ c.valid?
32
+ expect(c.address).to eq('Une adresse avec un blanc en fin')
33
+ end
34
+
35
+ it 'un retour a la ligne est également supprimé' do
36
+ c = @m.build_coord(:address=>"Une adresse avec un retour\n à la ligne\n")
37
+ c.valid?
38
+ expect(c.address).to eq("Une adresse avec un retour\n à la ligne")
39
+ end
29
40
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adherent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.12
4
+ version: 0.3.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean-Claude Lepage