Sha256: 918dfba9ade1bb4ad4ddc262dbdeaa67e5063f0e952e59f6501c32076b9588c7
Contents?: true
Size: 644 Bytes
Versions: 8
Compression:
Stored size: 644 Bytes
Contents
require 'spec_helper' RSpec.describe CmQuiz::Factory::User do describe '#create' do let(:jwt) { 'jwt' } let(:refresh_token) { 'refresh_token' } let!(:project_api) do api = double allow(api).to receive(:request) do |verb, path, opts| double(success?: true, body: { jwt: jwt, refresh_token: refresh_token}.to_json, code: 200) end api end let(:factory) do CmQuiz::Factory::User.new({ project_api: project_api }) end it "should create user" do res = factory.create expect(res[0]).to eq(jwt) expect(res[1]).to eq(refresh_token) end end end
Version data entries
8 entries across 8 versions & 1 rubygems