Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
j_platform / spec / models / social_feed_spec.rb
Size: Mime:
require 'spec_helper'

describe JPlatform::SocialFeed, :type => :model do
  before(:each) do
    stub_get("/api/v1/social_feeds.json?social_account_id=1").to_return(body: fixture("social_feeds.json"), headers: {content_type: "application/json; charset=utf-8"})
  end

  describe "Retrieves list of social feeds from api properly" do
    it "returns the social feeds of the given social account id" do
      social_feeds = JPlatform::SocialFeed.find(:all, params: { social_account_id: 1 })
      expect(a_get("/api/v1/social_feeds.json?social_account_id=1")).to have_been_made
      expect(social_feeds.first.type).to eq "SocialFeed::TwitterFeed::Mentions"
    end
  end
end