Sha256: 7b2d00373d7fb78efff97bfc31e9016b5c73b5e539f31e90cc1ebc028ffb4421

Contents?: true

Size: 779 Bytes

Versions: 2

Compression:

Stored size: 779 Bytes

Contents

require 'helper'

describe Twitter::API do

  before do
    @client = Twitter::Client.new
  end

  describe "#report_spam" do
    before do
      stub_post("/1.1/report_spam.json").
        with(:body => {:screen_name => "sferik"}).
        to_return(:body => fixture("sferik.json"), :headers => {:content_type => "application/json; charset=utf-8"})
    end
    it "requests the correct resource" do
      @client.report_spam("sferik")
      a_post("/1.1/report_spam.json").
        with(:body => {:screen_name => "sferik"}).
        should have_been_made
    end
    it "returns an array of users" do
      users = @client.report_spam("sferik")
      users.should be_an Array
      users.first.should be_a Twitter::User
      users.first.id.should eq 7505382
    end
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
twitter-4.1.0 spec/twitter/api/report_spam_spec.rb
twitter-4.0.0 spec/twitter/api/report_spam_spec.rb