Sha256: 8d688b18405b0ee410b0af179344cab3fe8a225fe414a1b82d96b84470032030

Contents?: true

Size: 664 Bytes

Versions: 1

Compression:

Stored size: 664 Bytes

Contents

require 'spec_helper'

describe MailUp::Stats do
  before(:each){ init_mailup }

  it 'should return a stats base object' do
    @mailup.stats.should be_an_instance_of(MailUp::Stats::Base)
  end

  it 'should have the correct API path' do
    @mailup.stats.api.path.should eq("/API/v#{MailUp::API_VERSION}/Rest/MailStatisticsService.svc")
  end

  %w(message recipient).each do |resource|
    context resource do
      it "should return a #{resource} object" do
        test = @mailup.stats.send(resource.to_sym, 1)
        test.should be_an_instance_of(Object.const_get("MailUp").const_get("Stats").const_get("#{resource.capitalize}"))
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mailup-1.2.0 spec/mailup/stats/base_spec.rb