Sha256: fce9eaabce593caf781539569ba79a97a4d729980156487c71436816d71ba350

Contents?: true

Size: 521 Bytes

Versions: 10

Compression:

Stored size: 521 Bytes

Contents

require 'spec_helper'

module Qcourses
  describe Location do
    describe 'storing locations' do
      subject { Location.new valid_attributes }
      let(:valid_attributes) {{name: 'Qwan Tilburg', address: "Gondelstraat", postal_code: "2323 AA", city: "Tilburg", url:"/contact" }}

      it "should be able to save an read back" do
        subject.save
        read_back = Location[subject.id]
        read_back.should == subject
      end

      it {should reject_values(nil, "").for(:name)} 
      
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
qcourses-0.1.11 spec/qcourses/models/location_spec.rb
qcourses-0.1.10 spec/qcourses/models/location_spec.rb
qcourses-0.1.9 spec/qcourses/models/location_spec.rb
qcourses-0.1.8 spec/qcourses/models/location_spec.rb
qcourses-0.1.7 spec/qcourses/models/location_spec.rb
qcourses-0.1.6 spec/qcourses/models/location_spec.rb
qcourses-0.1.5 spec/qcourses/models/location_spec.rb
qcourses-0.1.4 spec/qcourses/models/location_spec.rb
qcourses-0.1.3 spec/qcourses/models/location_spec.rb
qcourses-0.1.2 spec/qcourses/models/location_spec.rb