Sha256: fbe018e33331fdf212153c89db471ea07367b1b059594c5ed33cd7fab09d000d

Contents?: true

Size: 571 Bytes

Versions: 2

Compression:

Stored size: 571 Bytes

Contents

require "minitest_helper"

describe User do
  describe "password authentication" do
    let(:user) { User.new }

    it { user.must validate_presence_of(:email) }
    it { user.must_respond_to(:password) }
    it { user.must_respond_to(:password_confirmation) }
    it { user.must_respond_to(:authenticate) }

    describe "uniqueness" do
      before do
        existing_user = User.new(email: "blah@blah.com")
        existing_user.stubs(:valid?).returns(true)
        existing_user.save
      end

      it { user.must validate_presence_of(:email) }
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
thincloud-auth-0.1.2 lib/generators/thincloud/auth/templates/user_authentication_test.rb
thincloud-auth-0.1.1 lib/generators/thincloud/auth/templates/user_authentication_test.rb