Sha256: 5dadf861cedec505e6a43a92f27620ab32ca6ee08a035e7ed41576602739e6c2

Contents?: true

Size: 1.27 KB

Versions: 16

Compression:

Stored size: 1.27 KB

Contents

require 'helper'

describe Twitter::Action::Reply do

  describe "#sources" do
    it "returns a collection of users who replied to a user" do
      sources = Twitter::Action::Reply.new(:sources => [{:id => 7505382}]).sources
      expect(sources).to be_an Array
      expect(sources.first).to be_a Twitter::User
    end
    it "is empty when not set" do
      sources = Twitter::Action::Reply.new.sources
      expect(sources).to be_empty
    end
  end

  describe "#target_objects" do
    it "returns a collection of Tweets that reply to a user" do
      targets = Twitter::Action::Reply.new(:target_objects => [{:id => 25938088801}]).target_objects
      expect(targets).to be_an Array
      expect(targets.first).to be_a Twitter::Tweet
    end
    it "is empty when not set" do
      targets = Twitter::Action::Reply.new.target_objects
      expect(targets).to be_empty
    end
  end

  describe "#targets" do
    it "returns a collection that contains the replied-to status" do
      targets = Twitter::Action::Reply.new(:targets => [{:id => 25938088801}]).targets
      expect(targets).to be_an Array
      expect(targets.first).to be_a Twitter::Tweet
    end
    it "is empty when not set" do
      targets = Twitter::Action::Reply.new.targets
      expect(targets).to be_empty
    end
  end

end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
twitter-4.8.1 spec/twitter/action/reply_spec.rb
twitter-4.8.0 spec/twitter/action/reply_spec.rb
twitter-4.7.0 spec/twitter/action/reply_spec.rb
twitter-4.6.2 spec/twitter/action/reply_spec.rb
twitter-4.6.1 spec/twitter/action/reply_spec.rb
twitter-4.6.0 spec/twitter/action/reply_spec.rb
twitter-4.5.0 spec/twitter/action/reply_spec.rb
twitter-4.4.4 spec/twitter/action/reply_spec.rb
twitter-4.4.3 spec/twitter/action/reply_spec.rb
twitter-4.4.2 spec/twitter/action/reply_spec.rb
twitter-4.4.1 spec/twitter/action/reply_spec.rb
twitter-4.4.0 spec/twitter/action/reply_spec.rb
twitter-4.3.0 spec/twitter/action/reply_spec.rb
twitter-4.2.0 spec/twitter/action/reply_spec.rb
twitter-4.1.2 spec/twitter/action/reply_spec.rb
twitter-4.1.1 spec/twitter/action/reply_spec.rb