Sha256: 8d54eff62010165255afbfe296ae7e0c10932fa9d3596047b9d414f4935321de

Contents?: true

Size: 701 Bytes

Versions: 2

Compression:

Stored size: 701 Bytes

Contents

require 'livefyre'
require 'jwt'

RSpec.configure do |c|
  c.filter_run_excluding :broken => true
end

describe Livefyre::Network do
  before(:each) do
    @network = Livefyre.get_network(NETWORK_NAME, NETWORK_KEY)
  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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
livefyre-1.3.2 spec/livefyre/core/network_spec.rb
livefyre-1.3.0 spec/livefyre/core/network_spec.rb