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.3.4 spec/models/adherent/coord_spec.rb
adherent-0.3.3 spec/models/adherent/coord_spec.rb
adherent-0.3.2 spec/models/adherent/coord_spec.rb
adherent-0.3.1 spec/models/adherent/coord_spec.rb
adherent-0.3.0 spec/models/adherent/coord_spec.rb
adherent-0.2.9 spec/models/adherent/coord_spec.rb
adherent-0.2.8 spec/models/adherent/coord_spec.rb
adherent-0.2.7 spec/models/adherent/coord_spec.rb
adherent-0.2.6 spec/models/adherent/coord_spec.rb
adherent-0.2.5 spec/models/adherent/coord_spec.rb
adherent-0.2.4 spec/models/adherent/coord_spec.rb
adherent-0.2.3 spec/models/adherent/coord_spec.rb
adherent-0.2.2.4 spec/models/adherent/coord_spec.rb
adherent-0.2.2.3 spec/models/adherent/coord_spec.rb
adherent-0.2.2.2 spec/models/adherent/coord_spec.rb
adherent-0.2.2.1 spec/models/adherent/coord_spec.rb
adherent-0.2.2 spec/models/adherent/coord_spec.rb
adherent-0.2.1 spec/models/adherent/coord_spec.rb
adherent-0.2.0 spec/models/adherent/coord_spec.rb
adherent-0.1.10 spec/models/adherent/coord_spec.rb