Sha256: c5ef4e030cd2be0a962a11ea48a1359d457a82f48c367a047a1bd4e43d9d83cc
Contents?: true
Size: 640 Bytes
Versions: 23
Compression:
Stored size: 640 Bytes
Contents
require 'spec_helper' describe CoalescingPanda::CanvasApiAuth, type: :model do it { should validate_uniqueness_of(:user_id).scoped_to(:api_domain)} it { should validate_presence_of(:user_id)} it { should validate_presence_of(:api_domain)} describe '#expired?' do let(:auth) { FactoryGirl.create :canvas_api_auth } it 'is not expired if expires_at is null or in the future' do auth.expires_at = nil expect(auth.expired?).to be_falsey auth.expires_at = 1.hour.ago expect(auth.expired?).to be_truthy auth.expires_at = 1.hour.from_now expect(auth.expired?).to be_falsey end end end
Version data entries
23 entries across 23 versions & 1 rubygems