Repository URL to install this package:
|
Version:
2.23.0 ▾
|
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