Sha256: c55b4dd47c93c2de6d4b7e861ac20d606784f0e857edfec5c5d86646afdaefbb

Contents?: true

Size: 715 Bytes

Versions: 6

Compression:

Stored size: 715 Bytes

Contents

require 'spec_helper'

describe Mailroute::MailServer, :vcr => true do
  it 'should be possible to create, read, update and delete mail servers' do
    domain = Mailroute::Domain.get(4555)
    new_server = nil

    expect {
      new_server = Mailroute::MailServer.create(
        :server => 'xyz.example.com',
        :domain => domain,
        :priority => 8
      )
    }.to change { domain.reload.mail_servers.count }.by(1)

    new_server.reload.server.should == 'xyz.example.com'

    new_server.server = 'zyx.example.com'
    new_server.save!

    new_server.reload.server.should == 'zyx.example.com'

    expect {
      new_server.delete
    }.to change { domain.reload.mail_servers.count }.by(-1)
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
mailroute-0.0.6 spec/lib/mailroute/models/mail_server_spec.rb
mailroute-0.0.5 spec/lib/mailroute/models/mail_server_spec.rb
mailroute-0.0.4 spec/lib/mailroute/models/mail_server_spec.rb
mailroute-0.0.3 spec/lib/mailroute/models/mail_server_spec.rb
mailroute-0.0.2 spec/lib/mailroute/models/mail_server_spec.rb
mailroute-0.0.1 spec/lib/mailroute/models/mail_server_spec.rb