Sha256: d75319f202c87932f59fba6d7d8073eeb9376c766709bd2f70494b9c3176c22c

Contents?: true

Size: 861 Bytes

Versions: 16

Compression:

Stored size: 861 Bytes

Contents

require 'helper'

describe Twitter::Action::Follow do

  describe "#sources" do
    it "returns a collection of users who followed a user" do
      sources = Twitter::Action::Follow.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::Follow.new.sources
      expect(sources).to be_empty
    end
  end

  describe "#targets" do
    it "returns a collection containing the followed user" do
      targets = Twitter::Action::Follow.new(:targets => [{:id => 7505382}]).targets
      expect(targets).to be_an Array
      expect(targets.first).to be_a Twitter::User
    end
    it "is empty when not set" do
      targets = Twitter::Action::Follow.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/follow_spec.rb
twitter-4.8.0 spec/twitter/action/follow_spec.rb
twitter-4.7.0 spec/twitter/action/follow_spec.rb
twitter-4.6.2 spec/twitter/action/follow_spec.rb
twitter-4.6.1 spec/twitter/action/follow_spec.rb
twitter-4.6.0 spec/twitter/action/follow_spec.rb
twitter-4.5.0 spec/twitter/action/follow_spec.rb
twitter-4.4.4 spec/twitter/action/follow_spec.rb
twitter-4.4.3 spec/twitter/action/follow_spec.rb
twitter-4.4.2 spec/twitter/action/follow_spec.rb
twitter-4.4.1 spec/twitter/action/follow_spec.rb
twitter-4.4.0 spec/twitter/action/follow_spec.rb
twitter-4.3.0 spec/twitter/action/follow_spec.rb
twitter-4.2.0 spec/twitter/action/follow_spec.rb
twitter-4.1.2 spec/twitter/action/follow_spec.rb
twitter-4.1.1 spec/twitter/action/follow_spec.rb