Sha256: f07840e401104325cb9ac3fa09fe3ca9fb45134e2ce9310fb8ee045b694e2879

Contents?: true

Size: 1.06 KB

Versions: 1

Compression:

Stored size: 1.06 KB

Contents

require 'spec_helper'

describe User do
  before do
    client
  end

  context 'find' do

    subject { User.find }

    it 'returns object for current user' do
      expect(subject).to_not be_nil
      expect(subject).to be_a User
    end

    it 'parses info on user correctly' do
      expect(subject.contributor_id).to be nil
      expect(subject.customer_id).to eq ENV["SSTK_CUSTOMER_ID"]
      expect(subject.email).to be nil
      expect(subject.first_name).to eq ENV["SSTK_FIRST_NAME"]
      expect(subject.full_name).to eq ENV["SSTK_FULL_NAME"]
      expect(subject.id).to eq ENV["SSTK_USER_ID"]
      expect(subject.last_name).to eq ENV["SSTK_LAST_NAME"]
      expect(subject.language).to eq "en"
      expect(subject.organization_id).to eq nil
      expect(subject.username).to eq ENV["SSTK_USERNAME"]
      expect(subject.is_premier).to eq nil
      expect(subject.is_premier_parent).to eq nil
      expect(subject.premier_permissions).to eq nil
      expect(subject.only_sensitive_use).to eq nil
      expect(subject.only_enhanced_license).to eq nil
    end

  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
shutterstock-v2-0.0.1 spec/client/user_spec.rb