Sha256: 616b97f30079f27af81b82cfc87f641f55c5f5c4b31a46338901f97f5a8720ae
Contents?: true
Size: 521 Bytes
Versions: 2
Compression:
Stored size: 521 Bytes
Contents
require File.expand_path('../../../spec_helper', __FILE__) RSpec.describe Wechat::Api::JsTicket do let(:client) { double(:client) } subject do Wechat::Api::JsTicket.new client end it :refresh do allow(client).to receive(:js_ticket).and_return(expires_in: 7200, ticket: 'bxLdikRXVbTPdHSM05e5u5sUoXNKd8-41ZO3MhKoyN5OfkWITDGgnr2fwJ0m9E8NYzWKVZvdVtaUgWvsdshFKA') subject.refresh expect(subject.ticket).not_to be_nil should_not be_expired expect(subject.expires_at).to be_a(Date) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
wechat-api-0.4.1 | spec/wechat/api/js_ticket_spec.rb |
wechat-api-0.4.0 | spec/wechat/api/js_ticket_spec.rb |