Sha256: 0aae16a12aecb167bcbaee6f96d09e7e72a1978e2b0b94a521b47f8945e7cbd2

Contents?: true

Size: 432 Bytes

Versions: 1

Compression:

Stored size: 432 Bytes

Contents

require 'spec_helper'

module Landable
  describe AccessToken do
    it { should_not have_valid(:author_id).when(nil) }

    it 'generates an expiration timestamp before creation' do
      author = create :author
      permissions = { 'read' => 'true', 'edit' => 'true', 'publish' => 'true' }
      token = AccessToken.create!(author: author, permissions: permissions)
      expect(token.expires_at).not_to be_nil
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
landable-1.14.0 spec/models/landable/access_token_spec.rb