diff --git a/Gemfile.lock b/Gemfile.lock index b3eca0f..f4302e0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -225,6 +225,7 @@ GEM PLATFORMS x86_64-darwin-20 + x86_64-darwin-21 DEPENDENCIES bootsnap (>= 1.4.4) diff --git a/node_modules/.yarn-integrity b/node_modules/.yarn-integrity new file mode 100644 index 0000000..e274d7f --- /dev/null +++ b/node_modules/.yarn-integrity @@ -0,0 +1,10 @@ +{ + "systemParams": "darwin-x64-102", + "modulesFolders": [], + "flags": [], + "linkedModules": [], + "topLevelPatterns": [], + "lockfileEntries": {}, + "files": [], + "artifacts": {} +} \ No newline at end of file diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb new file mode 100644 index 0000000..c8f1bd6 --- /dev/null +++ b/spec/models/user_spec.rb @@ -0,0 +1,20 @@ +require 'rails_helper' + +RSpec.describe User, type: :model do + # pending "add some examples to (or delete) #{__FILE__}" + + subject { User.new(email: "jsmith@sample.com", password: "password") } + + it "is valid with valid attributes" do + expect(subject).to be_valid + end + it "is not valid without an email" do + subject.email = nil + expect(subject).to_not be_valid + end + it "is not valid if email is not unique" do + User.create(email: "jsmith@sample.com", password: "123456" ) + expect(subject).to_not be_valid + end + +end \ No newline at end of file diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..fb57ccd --- /dev/null +++ b/yarn.lock @@ -0,0 +1,4 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + +