Sha256: 32c7e75a2f3b223d3a2f7fd3752a2058819f97afa6484b9cf1d076b277cf24df

Contents?: true

Size: 848 Bytes

Versions: 28

Compression:

Stored size: 848 Bytes

Contents

require 'spec_helper'
describe Auth0::Api::V2::Stats do
  before :all do
    dummy_instance = DummyClass.new
    dummy_instance.extend(Auth0::Api::V2::Stats)
    @instance = dummy_instance
  end
  context '.active_users' do
    it { expect(@instance).to respond_to(:active_users) }
    it 'expect client to send get to /api/v2/stats/active-users' do
      expect(@instance).to receive(:get).with('/api/v2/stats/active-users')
      expect { @instance.active_users }.not_to raise_error
    end
  end
  context '.daily_stats' do
    it { expect(@instance).to respond_to(:daily_stats) }
    it 'expect client to send get to /api/v2/stats/daily' do
      expect(@instance).to receive(:get).with('/api/v2/stats/daily', from: '20120222', to: '20151222')
      expect { @instance.daily_stats('20120222', '20151222') }.not_to raise_error
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
auth0-5.6.1 spec/lib/auth0/api/v2/stats_spec.rb
auth0-5.6.0 spec/lib/auth0/api/v2/stats_spec.rb
auth0-5.5.0 spec/lib/auth0/api/v2/stats_spec.rb
auth0-5.4.0 spec/lib/auth0/api/v2/stats_spec.rb
auth0-5.3.0 spec/lib/auth0/api/v2/stats_spec.rb
auth0-5.2.0 spec/lib/auth0/api/v2/stats_spec.rb
auth0-5.1.2 spec/lib/auth0/api/v2/stats_spec.rb
auth0-5.1.1 spec/lib/auth0/api/v2/stats_spec.rb
auth0-5.1.0 spec/lib/auth0/api/v2/stats_spec.rb
auth0-5.0.1 spec/lib/auth0/api/v2/stats_spec.rb
auth0-5.0.0 spec/lib/auth0/api/v2/stats_spec.rb
auth0-4.17.1 spec/lib/auth0/api/v2/stats_spec.rb
auth0-4.17.0 spec/lib/auth0/api/v2/stats_spec.rb
auth0-4.16.0 spec/lib/auth0/api/v2/stats_spec.rb
auth0-4.15.0 spec/lib/auth0/api/v2/stats_spec.rb
auth0-4.14.0 spec/lib/auth0/api/v2/stats_spec.rb
auth0-4.13.0 spec/lib/auth0/api/v2/stats_spec.rb
auth0-4.12.0 spec/lib/auth0/api/v2/stats_spec.rb
auth0-4.11.0 spec/lib/auth0/api/v2/stats_spec.rb
auth0-4.10.0 spec/lib/auth0/api/v2/stats_spec.rb