Sha256: 8cfdf407fa22c17d1469e4420a2d63c42d17be8837eeb31d3aff2730caf64d39
Contents?: true
Size: 606 Bytes
Versions: 7
Compression:
Stored size: 606 Bytes
Contents
require "spec_helper" describe TriviaCrack::Parsers::SessionParser do describe ".parse" do subject { TriviaCrack::Parsers::SessionParser.parse raw_data } context 'when given data from the login API' do let(:raw_data) { SpecData.get "login.json" } it { is_expected.to be_a TriviaCrack::Session } its(:user_id) { is_expected.to be 111 } its(:username) { is_expected.to eq "example" } its(:session_id) { is_expected.to eq "session123" } its(:device_key) { is_expected.to eq "device123" } its(:expiration) { is_expected.to be_a Time } end end end
Version data entries
7 entries across 7 versions & 1 rubygems