Sha256: 9505bdbc5c7c9f5ab38a7b789b3f324e3f6865a97c89f8b5c7ade828d8a3fc39

Contents?: true

Size: 597 Bytes

Versions: 10

Compression:

Stored size: 597 Bytes

Contents

require 'spec_helper'

describe SpudInquiry do

  it {should have_many(:spud_inquiry_fields)}
  it {should belong_to(:spud_inquiry_form)}


  describe :accessors do
    it "should fetch email if field exists" do
      p = FactoryGirl.create(:spud_inquiry)
      email = FactoryGirl.create(:spud_inquiry_field, :spud_inquiry => p, :name => "email", :value => "test@spudcms.net")

      p.email.should == "test@spudcms.net"
    end

    it "should return unknown sender if email non-existent" do
      p = FactoryGirl.create(:spud_inquiry)
      p.email.should == "Unknown Sender"
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
spud_inquiries-1.0.1 spec/models/spud_inquiry_spec.rb
spud_inquiries-1.0.0 spec/models/spud_inquiry_spec.rb
spud_inquiries-1.0.0.rc4 spec/models/spud_inquiry_spec.rb
spud_inquiries-1.0.0.rc3 spec/models/spud_inquiry_spec.rb
spud_inquiries-1.0.0.rc2 spec/models/spud_inquiry_spec.rb
spud_inquiries-1.0.0.rc1.1 spec/models/spud_inquiry_spec.rb
spud_inquiries-1.0.0.rc1 spec/models/spud_inquiry_spec.rb
spud_inquiries-0.9.5 spec/models/spud_inquiry_spec.rb
spud_inquiries-0.9.3 spec/models/spud_inquiry_spec.rb
spud_inquiries-0.9.2 spec/models/spud_inquiry_spec.rb