Sha256: 24b98c08bb2e04e829073158e501784bd85b57f578b923df1ecb6db12cbf05b8

Contents?: true

Size: 573 Bytes

Versions: 14

Compression:

Stored size: 573 Bytes

Contents

require 'rails_helper'

RSpec.describe Identity, :type => :model do
  it "should always have a provider and uid" do
    i = Identity.create
    expect( i ).to_not be_valid

    i = Identity.create( :provider => "test" )
    expect( i ).to_not be_valid

    i = Identity.create( :provider => "test", :uid => "1" )
    expect( i ).to be_valid
  end

  it "should have a unique uid" do
    i = Identity.create( :provider => "test", :uid => "1" )
    expect( i ).to be_valid

    i = Identity.create( :provider => "test", :uid => "1" )
    expect( i ).to_not be_valid
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
happy_seed-0.0.19 lib/generators/happy_seed/omniauth/templates/spec/models/identity_spec.rb
happy_seed-0.0.18 lib/generators/happy_seed/omniauth/templates/spec/models/identity_spec.rb
happy_seed-0.0.17 lib/generators/happy_seed/omniauth/templates/spec/models/identity_spec.rb
happy_seed-0.0.16 lib/generators/happy_seed/omniauth/templates/spec/models/identity_spec.rb
happy_seed-0.0.15 lib/generators/happy_seed/omniauth/templates/spec/models/identity_spec.rb
happy_seed-0.0.14 lib/generators/happy_seed/omniauth/templates/spec/models/identity_spec.rb
happy_seed-0.0.13 lib/generators/happy_seed/omniauth/templates/spec/models/identity_spec.rb
happy_seed-0.0.12 lib/generators/happy_seed/omniauth/templates/spec/models/identity_spec.rb
happy_seed-0.0.11 lib/generators/happy_seed/omniauth/templates/spec/models/identity_spec.rb
happy_seed-0.0.10 lib/generators/happy_seed/omniauth/templates/spec/models/identity_spec.rb
happy_seed-0.0.9 lib/generators/happy_seed/omniauth/templates/spec/models/identity_spec.rb
happy_seed-0.0.8 lib/generators/happy_seed/omniauth/templates/spec/models/identity_spec.rb
happy_seed-0.0.7 lib/generators/happy_seed/omniauth/templates/spec/models/identity_spec.rb
happy_seed-0.0.6 lib/generators/happy_seed/omniauth/templates/spec/models/identity_spec.rb