Sha256: e65dfcde9f8db453adc9710dcbf21abd664a94665b90997e4480bd9006c9de60

Contents?: true

Size: 754 Bytes

Versions: 5

Compression:

Stored size: 754 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

describe "Feedback" do
  before :all do
    @feedback = AmazonSellerCentral::Feedback.new
  end
  %w{date rating comments arrived_on_time item_as_described customer_service order_id rater_email rater_role}.each do |expected_attribute|
    it "Has an attribute \"#{expected_attribute}\"" do
      @feedback.send("#{expected_attribute}=", "foo")
      @feedback.send(expected_attribute).should == "foo"
    end
  end

  it "should parse the date correctly" do
    fp = AmazonSellerCentral::FeedbackPage.load_first_page
    f = fp.parse
    feedback_date = f.first.date
    feedback_date.year.should == 2011
    feedback_date.month.should == 7
    feedback_date.day.should == 3
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
amazon_seller_central-0.3.0 spec/lib/feedback_spec.rb
amazon_seller_central-0.2.16 spec/lib/feedback_spec.rb
amazon_seller_central-0.2.15 spec/lib/feedback_spec.rb
amazon_seller_central-0.2.14 spec/lib/feedback_spec.rb
amazon_seller_central-0.2.13 spec/lib/feedback_spec.rb