Sha256: 057831f2219d9bd84bf43a277f7f08a32cbac1a7d84c656eaac7fb7920be0e99
Contents?: true
Size: 527 Bytes
Versions: 2
Compression:
Stored size: 527 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.3 | spec/wechat/api/js_ticket_spec.rb |
wechat-api-0.4.2 | spec/wechat/api/js_ticket_spec.rb |