Sha256: b7c45ce2ae189f3b84a2945bfc069b8f96c924e26be81abdab65d2c8abf587f6
Contents?: true
Size: 625 Bytes
Versions: 36
Compression:
Stored size: 625 Bytes
Contents
require 'spec_helper' describe CoalescingPanda::CanvasApiAuth 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
36 entries across 36 versions & 1 rubygems