Sha256: 4b03220ff07727e16107467909aa120ee219030d6896f0c6b8f8e1b909da1660
Contents?: true
Size: 612 Bytes
Versions: 21
Compression:
Stored size: 612 Bytes
Contents
# coding utf-8 require 'rails_helper' describe 'Coord', :type => :model do before(:each) do @m = double(Adherent::Member) end it 'les coordonnées sont rattachées à un membre' do @c = Adherent::Coord.new() @c.valid? expect(@c.errors[:member_id].size).to eq(1) end it 'coord est dépendant du membre' do m = Adherent::Member.new(number:'Adh1', name:'James', forname:'Jessie') m.organism_id = 1 m.save @c = m.create_coord(city:'Lille', zip:59000) expect(Adherent::Coord.count).to eq(1) m.destroy expect(Adherent::Coord.count).to eq(0) end end
Version data entries
21 entries across 21 versions & 1 rubygems
Version | Path |
---|---|
adherent-0.1.9 | spec/models/adherent/coord_spec.rb |