Sha256: 4c6d65635e582bed4005536af5c90eae9b38e34747f6d782b21afc54a2f30f65
Contents?: true
Size: 1.52 KB
Versions: 1
Compression:
Stored size: 1.52 KB
Contents
require 'livefyre' describe Livefyre::Network do before(:each) do @network = Livefyre.get_network('networkName', 'networkKey') end it 'should raise ArgumentError if url_template does not contain {id}' do expect{ @network.set_user_sync_url('blah.com/') }.to raise_error(ArgumentError) end it 'should raise ArgumentError if user_id is not alphanumeric' do expect{ @network.build_user_auth_token('fjoiwje.1fj', 'test', 100) }.to raise_error(ArgumentError) end it 'should validate a livefyre token' do @network.validate_livefyre_token(@network.build_livefyre_token).should == true end end describe Livefyre::Network::Site do before(:each) do @site = Livefyre.get_network('networkName', 'networkKey').get_site('siteId', "siteKey") end it 'should raise ArgumentError if url is not a valid url' do expect{ @site.build_collection_meta_token('test', 'test', 'blah.com/', 'test') }.to raise_error(ArgumentError) end it 'should raise ArgumentError if title is more than 255 characters' do expect{ @site.build_collection_meta_token('1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456', 'test', 'http://test.com', 'test') }.to raise_error(ArgumentError) end it 'should return a collection meta token' do expect{ @site.build_collection_meta_token('title', 'article_id', 'https://www.url.com', 'tags') }.to be_true end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
livefyre-1.1.0 | spec/livefyre/core_spec.rb |