diff --git a/Gemfile.lock b/Gemfile.lock index c799570..dc46ebc 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -3,53 +3,49 @@ PATH specs: knock_once (0.2.2) knock (~> 2.1) - rails (~> 5.1) + rails (~> 5.1.0) GEM remote: https://rubygems.org/ specs: - actioncable (5.2.1) - actionpack (= 5.2.1) + actioncable (5.1.6) + actionpack (= 5.1.6) nio4r (~> 2.0) - websocket-driver (>= 0.6.1) - actionmailer (5.2.1) - actionpack (= 5.2.1) - actionview (= 5.2.1) - activejob (= 5.2.1) + websocket-driver (~> 0.6.1) + actionmailer (5.1.6) + actionpack (= 5.1.6) + actionview (= 5.1.6) + activejob (= 5.1.6) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (5.2.1) - actionview (= 5.2.1) - activesupport (= 5.2.1) + actionpack (5.1.6) + actionview (= 5.1.6) + activesupport (= 5.1.6) rack (~> 2.0) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (5.2.1) - activesupport (= 5.2.1) + actionview (5.1.6) + activesupport (= 5.1.6) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.3) - activejob (5.2.1) - activesupport (= 5.2.1) + activejob (5.1.6) + activesupport (= 5.1.6) globalid (>= 0.3.6) - activemodel (5.2.1) - activesupport (= 5.2.1) - activerecord (5.2.1) - activemodel (= 5.2.1) - activesupport (= 5.2.1) - arel (>= 9.0) - activestorage (5.2.1) - actionpack (= 5.2.1) - activerecord (= 5.2.1) - marcel (~> 0.3.1) - activesupport (5.2.1) + activemodel (5.1.6) + activesupport (= 5.1.6) + activerecord (5.1.6) + activemodel (= 5.1.6) + activesupport (= 5.1.6) + arel (~> 8.0) + activesupport (5.1.6) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) tzinfo (~> 1.1) - arel (9.0.0) + arel (8.0.0) bcrypt (3.1.12) builder (3.2.3) concurrent-ruby (1.0.5) @@ -76,10 +72,7 @@ GEM nokogiri (>= 1.5.9) mail (2.7.0) mini_mime (>= 0.1.1) - marcel (0.3.2) - mimemagic (~> 0.3.2) method_source (0.9.0) - mimemagic (0.3.2) mini_mime (1.0.1) mini_portile2 (2.3.0) minitest (5.11.3) @@ -90,30 +83,29 @@ GEM rack (2.0.5) rack-test (1.1.0) rack (>= 1.0, < 3) - rails (5.2.1) - actioncable (= 5.2.1) - actionmailer (= 5.2.1) - actionpack (= 5.2.1) - actionview (= 5.2.1) - activejob (= 5.2.1) - activemodel (= 5.2.1) - activerecord (= 5.2.1) - activestorage (= 5.2.1) - activesupport (= 5.2.1) + rails (5.1.6) + actioncable (= 5.1.6) + actionmailer (= 5.1.6) + actionpack (= 5.1.6) + actionview (= 5.1.6) + activejob (= 5.1.6) + activemodel (= 5.1.6) + activerecord (= 5.1.6) + activesupport (= 5.1.6) bundler (>= 1.3.0) - railties (= 5.2.1) + railties (= 5.1.6) sprockets-rails (>= 2.0.0) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) rails-html-sanitizer (1.0.4) loofah (~> 2.2, >= 2.2.2) - railties (5.2.1) - actionpack (= 5.2.1) - activesupport (= 5.2.1) + railties (5.1.6) + actionpack (= 5.1.6) + activesupport (= 5.1.6) method_source rake (>= 0.8.7) - thor (>= 0.19.0, < 2.0) + thor (>= 0.18.1, < 2.0) rake (12.3.1) rspec-core (3.8.0) rspec-support (~> 3.8.0) @@ -144,7 +136,7 @@ GEM thread_safe (0.3.6) tzinfo (1.2.5) thread_safe (~> 0.1) - websocket-driver (0.7.0) + websocket-driver (0.6.5) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.3) diff --git a/knock_once.gemspec b/knock_once.gemspec index bf756a9..0c53b84 100644 --- a/knock_once.gemspec +++ b/knock_once.gemspec @@ -16,7 +16,7 @@ Gem::Specification.new do |s| s.files = Dir["{app,config,db,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.md"] - s.add_dependency "rails", "~> 5.1" + s.add_dependency "rails", "~> 5.1.0" s.add_dependency "knock", "~> 2.1" s.add_development_dependency "sqlite3", "~> 1.3" diff --git a/spec/requests/knock_once/knock_once_users_spec.rb b/spec/requests/knock_once/knock_once_users_spec.rb index 72015d8..f83d26c 100644 --- a/spec/requests/knock_once/knock_once_users_spec.rb +++ b/spec/requests/knock_once/knock_once_users_spec.rb @@ -133,8 +133,13 @@ end context 'whent the body is invalid' do - it 'return 422' do - post users_path, params: { clowns: 'bozo', password: 'password', password_confirmation: 'notPassword' } + it 'rejects mismatched passwords' do + post users_path, params: { email: 'bozo@example.com', password: 'password', password_confirmation: 'notPassword' } + expect(response).to have_http_status(422) + end + + it 'rejects missing password confirmations' do + post users_path, params: { email: 'bozo@example.com', password: 'password' } expect(response).to have_http_status(422) end end