Sha256: 2022333ebe6835f2ec6bafa0cf4e3c1033a67be48fb71859434ab46ea375d1ae

Contents?: true

Size: 551 Bytes

Versions: 6

Compression:

Stored size: 551 Bytes

Contents

require 'spec_helper'

RSpec.describe CmQuiz::Review::LoginUser do
  describe '#perform' do
    let!(:project_api) do
      api = double
      allow(api).to receive(:request) do |verb, path, opts|
        double(success?: true, body: { jwt: '', refresh_token: ''}.to_json, code: 200)
      end
      api
    end
    let(:service) do
      CmQuiz::Review::LoginUser.new({
        project_api: project_api
      })
    end

    it "should pass test" do
      test_result = service.perform

      assert_test_case(service, test_result)
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
cm_quiz-0.0.8 spec/lib/cm_quiz/review/login_user_spec.rb
cm_quiz-0.0.7 spec/lib/cm_quiz/review/login_user_spec.rb
cm_quiz-0.0.6 spec/lib/cm_quiz/review/login_user_spec.rb
cm_quiz-0.0.5 spec/lib/cm_quiz/review/login_user_spec.rb
cm_quiz-0.0.4 spec/lib/cm_quiz/review/login_user_spec.rb
cm_quiz-0.0.3 spec/lib/cm_quiz/review/login_user_spec.rb