From 0e31ff6604dd2e933ec7562e46232b840ac88d83 Mon Sep 17 00:00:00 2001 From: Bitaman Date: Mon, 8 Apr 2019 12:21:15 -0700 Subject: [PATCH 01/16] Run rails new --- .gitignore | 3 + .ruby-version | 1 + Gemfile | 81 ++++++ Gemfile.lock | 274 ++++++++++++++++++ Guardfile | 9 + README.md | 89 +----- Rakefile | 6 + app/assets/config/manifest.js | 3 + app/assets/images/.keep | 0 app/assets/javascripts/application.js | 16 + app/assets/javascripts/cable.js | 13 + app/assets/javascripts/channels/.keep | 0 app/assets/stylesheets/application.css | 15 + app/channels/application_cable/channel.rb | 4 + app/channels/application_cable/connection.rb | 4 + app/controllers/application_controller.rb | 2 + app/controllers/concerns/.keep | 0 app/helpers/application_helper.rb | 2 + app/jobs/application_job.rb | 2 + app/mailers/application_mailer.rb | 4 + app/models/application_record.rb | 3 + app/models/concerns/.keep | 0 app/views/layouts/application.html.erb | 15 + app/views/layouts/mailer.html.erb | 13 + app/views/layouts/mailer.text.erb | 1 + bin/bundle | 3 + bin/rails | 9 + bin/rake | 9 + bin/setup | 36 +++ bin/spring | 17 ++ bin/update | 31 ++ bin/yarn | 11 + config.ru | 5 + config/application.rb | 26 ++ config/boot.rb | 4 + config/cable.yml | 10 + config/credentials.yml.enc | 1 + config/database.yml | 85 ++++++ config/environment.rb | 5 + config/environments/development.rb | 61 ++++ config/environments/production.rb | 94 ++++++ config/environments/test.rb | 46 +++ config/initializers/action_view.rb | 1 + .../application_controller_renderer.rb | 8 + config/initializers/assets.rb | 14 + config/initializers/backtrace_silencers.rb | 7 + .../initializers/content_security_policy.rb | 25 ++ config/initializers/cookies_serializer.rb | 5 + .../initializers/filter_parameter_logging.rb | 4 + config/initializers/inflections.rb | 16 + config/initializers/mime_types.rb | 4 + config/initializers/wrap_parameters.rb | 14 + config/locales/en.yml | 33 +++ config/puma.rb | 34 +++ config/routes.rb | 3 + config/spring.rb | 6 + config/storage.yml | 34 +++ db/seeds.rb | 7 + lib/assets/.keep | 0 lib/tasks/.keep | 0 log/.keep | 0 log/development.log | 0 package.json | 5 + public/404.html | 67 +++++ public/422.html | 67 +++++ public/500.html | 66 +++++ public/apple-touch-icon-precomposed.png | 0 public/apple-touch-icon.png | 0 public/favicon.ico | 0 public/robots.txt | 1 + storage/.keep | 0 test/application_system_test_case.rb | 5 + test/fixtures/.keep | 0 test/fixtures/files/.keep | 0 test/helpers/.keep | 0 test/integration/.keep | 0 test/mailers/.keep | 0 test/models/.keep | 0 test/system/.keep | 0 test/test_helper.rb | 26 ++ vendor/.keep | 0 81 files changed, 1389 insertions(+), 76 deletions(-) create mode 100644 .ruby-version create mode 100644 Gemfile create mode 100644 Gemfile.lock create mode 100644 Guardfile create mode 100644 Rakefile create mode 100644 app/assets/config/manifest.js create mode 100644 app/assets/images/.keep create mode 100644 app/assets/javascripts/application.js create mode 100644 app/assets/javascripts/cable.js create mode 100644 app/assets/javascripts/channels/.keep create mode 100644 app/assets/stylesheets/application.css create mode 100644 app/channels/application_cable/channel.rb create mode 100644 app/channels/application_cable/connection.rb create mode 100644 app/controllers/application_controller.rb create mode 100644 app/controllers/concerns/.keep create mode 100644 app/helpers/application_helper.rb create mode 100644 app/jobs/application_job.rb create mode 100644 app/mailers/application_mailer.rb create mode 100644 app/models/application_record.rb create mode 100644 app/models/concerns/.keep create mode 100644 app/views/layouts/application.html.erb create mode 100644 app/views/layouts/mailer.html.erb create mode 100644 app/views/layouts/mailer.text.erb create mode 100755 bin/bundle create mode 100755 bin/rails create mode 100755 bin/rake create mode 100755 bin/setup create mode 100755 bin/spring create mode 100755 bin/update create mode 100755 bin/yarn create mode 100644 config.ru create mode 100644 config/application.rb create mode 100644 config/boot.rb create mode 100644 config/cable.yml create mode 100644 config/credentials.yml.enc create mode 100644 config/database.yml create mode 100644 config/environment.rb create mode 100644 config/environments/development.rb create mode 100644 config/environments/production.rb create mode 100644 config/environments/test.rb create mode 100644 config/initializers/action_view.rb create mode 100644 config/initializers/application_controller_renderer.rb create mode 100644 config/initializers/assets.rb create mode 100644 config/initializers/backtrace_silencers.rb create mode 100644 config/initializers/content_security_policy.rb create mode 100644 config/initializers/cookies_serializer.rb create mode 100644 config/initializers/filter_parameter_logging.rb create mode 100644 config/initializers/inflections.rb create mode 100644 config/initializers/mime_types.rb create mode 100644 config/initializers/wrap_parameters.rb create mode 100644 config/locales/en.yml create mode 100644 config/puma.rb create mode 100644 config/routes.rb create mode 100644 config/spring.rb create mode 100644 config/storage.yml create mode 100644 db/seeds.rb create mode 100644 lib/assets/.keep create mode 100644 lib/tasks/.keep create mode 100644 log/.keep create mode 100644 log/development.log create mode 100644 package.json create mode 100644 public/404.html create mode 100644 public/422.html create mode 100644 public/500.html create mode 100644 public/apple-touch-icon-precomposed.png create mode 100644 public/apple-touch-icon.png create mode 100644 public/favicon.ico create mode 100644 public/robots.txt create mode 100644 storage/.keep create mode 100644 test/application_system_test_case.rb create mode 100644 test/fixtures/.keep create mode 100644 test/fixtures/files/.keep create mode 100644 test/helpers/.keep create mode 100644 test/integration/.keep create mode 100644 test/mailers/.keep create mode 100644 test/models/.keep create mode 100644 test/system/.keep create mode 100644 test/test_helper.rb create mode 100644 vendor/.keep diff --git a/.gitignore b/.gitignore index 74b0d5d2c..40b6a3061 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,6 @@ build/ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this: .rvmrc .DS_Store + +# Ignore master key for decrypting credentials and more. +/config/master.key diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 000000000..10ff272b5 --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +ruby-2.6.0 \ No newline at end of file diff --git a/Gemfile b/Gemfile new file mode 100644 index 000000000..8850769c9 --- /dev/null +++ b/Gemfile @@ -0,0 +1,81 @@ +source 'https://rubygems.org' +git_source(:github) { |repo| "https://github.com/#{repo}.git" } + +ruby '2.6.0' + +# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' +gem 'rails', '~> 5.2.3' +# Use postgresql as the database for Active Record +gem 'pg', '>= 0.18', '< 2.0' +# Use Puma as the app server +gem 'puma', '~> 3.11' +# Use SCSS for stylesheets +gem 'sass-rails', '~> 5.0' +# Use Uglifier as compressor for JavaScript assets +gem 'uglifier', '>= 1.3.0' +# See https://github.com/rails/execjs#readme for more supported runtimes +# gem 'mini_racer', platforms: :ruby + +# Use CoffeeScript for .coffee assets and views +# gem 'coffee-rails', '~> 4.2' +# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks +gem 'turbolinks', '~> 5' +# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder +gem 'jbuilder', '~> 2.5' +# Use Redis adapter to run Action Cable in production +# gem 'redis', '~> 4.0' +# Use ActiveModel has_secure_password +# gem 'bcrypt', '~> 3.1.7' + +# Use ActiveStorage variant +# gem 'mini_magick', '~> 4.8' + +# Use Capistrano for deployment +# gem 'capistrano-rails', group: :development + +# Reduces boot times through caching; required in config/boot.rb +gem 'bootsnap', '>= 1.1.0', require: false + +group :development, :test do + # Call 'byebug' anywhere in the code to stop execution and get a debugger console + gem 'byebug', platforms: [:mri, :mingw, :x64_mingw] +end + +group :development do + # Access an interactive console on exception pages or by calling 'console' anywhere in the code. + gem 'web-console', '>= 3.3.0' + gem 'listen', '>= 3.0.5', '< 3.2' + # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring + gem 'spring' + gem 'spring-watcher-listen', '~> 2.0.0' +end + +group :test do + # Adds support for Capybara system testing and selenium driver + gem 'capybara', '>= 2.15' + gem 'selenium-webdriver' + # Easy installation and use of chromedriver to run system tests with Chrome + gem 'chromedriver-helper' +end + +# Windows does not include zoneinfo files, so bundle the tzinfo-data gem +gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] + +gem 'jquery-turbolinks' +gem 'jquery-rails' +group :development, :test do + gem 'pry-rails' +end + +group :development do + gem 'better_errors' + gem 'binding_of_caller' + gem 'guard' + gem 'guard-minitest' +end + +group :test do + gem 'minitest-rails' + gem 'minitest-reporters' + gem 'minitest-skip' +end diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 000000000..9306635d4 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,274 @@ +GEM + remote: https://rubygems.org/ + specs: + actioncable (5.2.3) + actionpack (= 5.2.3) + nio4r (~> 2.0) + websocket-driver (>= 0.6.1) + actionmailer (5.2.3) + actionpack (= 5.2.3) + actionview (= 5.2.3) + activejob (= 5.2.3) + mail (~> 2.5, >= 2.5.4) + rails-dom-testing (~> 2.0) + actionpack (5.2.3) + actionview (= 5.2.3) + activesupport (= 5.2.3) + rack (~> 2.0) + rack-test (>= 0.6.3) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.0.2) + actionview (5.2.3) + activesupport (= 5.2.3) + builder (~> 3.1) + erubi (~> 1.4) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.0.3) + activejob (5.2.3) + activesupport (= 5.2.3) + globalid (>= 0.3.6) + activemodel (5.2.3) + activesupport (= 5.2.3) + activerecord (5.2.3) + activemodel (= 5.2.3) + activesupport (= 5.2.3) + arel (>= 9.0) + activestorage (5.2.3) + actionpack (= 5.2.3) + activerecord (= 5.2.3) + marcel (~> 0.3.1) + activesupport (5.2.3) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 0.7, < 2) + minitest (~> 5.1) + tzinfo (~> 1.1) + addressable (2.6.0) + public_suffix (>= 2.0.2, < 4.0) + ansi (1.5.0) + archive-zip (0.12.0) + io-like (~> 0.3.0) + arel (9.0.0) + better_errors (2.5.1) + coderay (>= 1.0.0) + erubi (>= 1.0.0) + rack (>= 0.9.0) + bindex (0.6.0) + binding_of_caller (0.8.0) + debug_inspector (>= 0.0.1) + bootsnap (1.4.2) + msgpack (~> 1.0) + builder (3.2.3) + byebug (11.0.1) + capybara (3.16.1) + addressable + mini_mime (>= 0.1.3) + nokogiri (~> 1.8) + rack (>= 1.6.0) + rack-test (>= 0.6.3) + regexp_parser (~> 1.2) + xpath (~> 3.2) + childprocess (0.9.0) + ffi (~> 1.0, >= 1.0.11) + chromedriver-helper (2.1.1) + archive-zip (~> 0.10) + nokogiri (~> 1.8) + coderay (1.1.2) + concurrent-ruby (1.1.5) + crass (1.0.4) + debug_inspector (0.0.3) + erubi (1.8.0) + execjs (2.7.0) + ffi (1.10.0) + formatador (0.2.5) + globalid (0.4.2) + activesupport (>= 4.2.0) + guard (2.15.0) + formatador (>= 0.2.4) + listen (>= 2.7, < 4.0) + lumberjack (>= 1.0.12, < 2.0) + nenv (~> 0.1) + notiffany (~> 0.0) + pry (>= 0.9.12) + shellany (~> 0.0) + thor (>= 0.18.1) + guard-compat (1.2.1) + guard-minitest (2.4.6) + guard-compat (~> 1.2) + minitest (>= 3.0) + i18n (1.6.0) + concurrent-ruby (~> 1.0) + io-like (0.3.0) + jbuilder (2.8.0) + activesupport (>= 4.2.0) + multi_json (>= 1.2) + jquery-rails (4.3.3) + rails-dom-testing (>= 1, < 3) + railties (>= 4.2.0) + thor (>= 0.14, < 2.0) + jquery-turbolinks (2.1.0) + railties (>= 3.1.0) + turbolinks + listen (3.1.5) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + ruby_dep (~> 1.2) + loofah (2.2.3) + crass (~> 1.0.2) + nokogiri (>= 1.5.9) + lumberjack (1.0.13) + mail (2.7.1) + mini_mime (>= 0.1.1) + marcel (0.3.3) + mimemagic (~> 0.3.2) + method_source (0.9.2) + mimemagic (0.3.3) + mini_mime (1.0.1) + mini_portile2 (2.4.0) + minitest (5.11.3) + minitest-rails (3.0.0) + minitest (~> 5.8) + railties (~> 5.0) + minitest-reporters (1.3.6) + ansi + builder + minitest (>= 5.0) + ruby-progressbar + minitest-skip (0.0.1) + minitest (~> 5.0) + msgpack (1.2.9) + multi_json (1.13.1) + nenv (0.3.0) + nio4r (2.3.1) + nokogiri (1.10.2) + mini_portile2 (~> 2.4.0) + notiffany (0.1.1) + nenv (~> 0.1) + shellany (~> 0.0) + pg (1.1.4) + pry (0.12.2) + coderay (~> 1.1.0) + method_source (~> 0.9.0) + pry-rails (0.3.9) + pry (>= 0.10.4) + public_suffix (3.0.3) + puma (3.12.1) + rack (2.0.7) + rack-test (1.1.0) + rack (>= 1.0, < 3) + rails (5.2.3) + actioncable (= 5.2.3) + actionmailer (= 5.2.3) + actionpack (= 5.2.3) + actionview (= 5.2.3) + activejob (= 5.2.3) + activemodel (= 5.2.3) + activerecord (= 5.2.3) + activestorage (= 5.2.3) + activesupport (= 5.2.3) + bundler (>= 1.3.0) + railties (= 5.2.3) + 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.3) + actionpack (= 5.2.3) + activesupport (= 5.2.3) + method_source + rake (>= 0.8.7) + thor (>= 0.19.0, < 2.0) + rake (12.3.2) + rb-fsevent (0.10.3) + rb-inotify (0.10.0) + ffi (~> 1.0) + regexp_parser (1.4.0) + ruby-progressbar (1.10.0) + ruby_dep (1.5.0) + rubyzip (1.2.2) + sass (3.7.4) + sass-listen (~> 4.0.0) + sass-listen (4.0.0) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + sass-rails (5.0.7) + railties (>= 4.0.0, < 6) + sass (~> 3.1) + sprockets (>= 2.8, < 4.0) + sprockets-rails (>= 2.0, < 4.0) + tilt (>= 1.1, < 3) + selenium-webdriver (3.141.0) + childprocess (~> 0.5) + rubyzip (~> 1.2, >= 1.2.2) + shellany (0.0.1) + spring (2.0.2) + activesupport (>= 4.2) + spring-watcher-listen (2.0.1) + listen (>= 2.7, < 4.0) + spring (>= 1.2, < 3.0) + sprockets (3.7.2) + concurrent-ruby (~> 1.0) + rack (> 1, < 3) + sprockets-rails (3.2.1) + actionpack (>= 4.0) + activesupport (>= 4.0) + sprockets (>= 3.0.0) + thor (0.20.3) + thread_safe (0.3.6) + tilt (2.0.9) + turbolinks (5.2.0) + turbolinks-source (~> 5.2) + turbolinks-source (5.2.0) + tzinfo (1.2.5) + thread_safe (~> 0.1) + uglifier (4.1.20) + execjs (>= 0.3.0, < 3) + web-console (3.7.0) + actionview (>= 5.0) + activemodel (>= 5.0) + bindex (>= 0.4.0) + railties (>= 5.0) + websocket-driver (0.7.0) + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.3) + xpath (3.2.0) + nokogiri (~> 1.8) + +PLATFORMS + ruby + +DEPENDENCIES + better_errors + binding_of_caller + bootsnap (>= 1.1.0) + byebug + capybara (>= 2.15) + chromedriver-helper + guard + guard-minitest + jbuilder (~> 2.5) + jquery-rails + jquery-turbolinks + listen (>= 3.0.5, < 3.2) + minitest-rails + minitest-reporters + minitest-skip + pg (>= 0.18, < 2.0) + pry-rails + puma (~> 3.11) + rails (~> 5.2.3) + sass-rails (~> 5.0) + selenium-webdriver + spring + spring-watcher-listen (~> 2.0.0) + turbolinks (~> 5) + tzinfo-data + uglifier (>= 1.3.0) + web-console (>= 3.3.0) + +RUBY VERSION + ruby 2.6.0p0 + +BUNDLED WITH + 1.17.3 diff --git a/Guardfile b/Guardfile new file mode 100644 index 000000000..e34f706f4 --- /dev/null +++ b/Guardfile @@ -0,0 +1,9 @@ +guard :minitest, autorun: false, spring: true do + watch(%r{^app/(.+).rb$}) { |m| "test/#{m[1]}_test.rb" } + watch(%r{^app/controllers/application_controller.rb$}) { 'test/controllers' } + watch(%r{^app/controllers/(.+)_controller.rb$}) { |m| "test/integration/#{m[1]}_test.rb" } + watch(%r{^app/views/(.+)_mailer/.+}) { |m| "test/mailers/#{m[1]}_mailer_test.rb" } + watch(%r{^lib/(.+).rb$}) { |m| "test/lib/#{m[1]}_test.rb" } + watch(%r{^test/.+_test.rb$}) + watch(%r{^test/test_helper.rb$}) { 'test' } +end diff --git a/README.md b/README.md index d838dfcb0..7db80e4ca 100644 --- a/README.md +++ b/README.md @@ -1,87 +1,24 @@ -# Task List +# README -Let's build a Task List in Rails! We will solve the problem of tracking tasks in a web application. This project will enable us to keep track of and persist, add, edit and remove tasks. This is an individual Stage 1 project. +This README would normally document whatever steps are necessary to get the +application up and running. -This project is due: **Monday April 15th**. +Things you may want to cover: -## Learning Goals +* Ruby version -Practice all aspects of Rails development. +* System dependencies -- Create a new Rails application -- Explore each aspect of the Rails Request Cycle: Model, View, Controller -- Implement RESTful routes using Rails standards -- Complete all CRUD actions in a Rails application +* Configuration -## Baseline +* Database creation -In this baseline, you'll create a new Rails application and get started with two of the major components: route, controller and view. +* Database initialization -- Fork and clone this repository to your computer -- Create a new Rails application using `rails new .` - - create a `Tasks` controller - - create a route to view the task `index` page - - create a controller action for the task `index` page which contains an array of hard-coded tasks - - create an ERB view to display the tasks from the controller action +* How to run the test suite -### Controller Tests +* Services (job queues, cache servers, search engines, etc.) -Tests have been created for waves 1 & 2. You can find the tests in `test/controllers/tasks_controller_test.rb`, and you can execute the tests with `$ rails test`. You may need to update the test file if your schema differs from the one in the spec. For waves 3 & 4, you will need to fill in your own tests. +* Deployment instructions -## Wave 1 - -This wave is where we introduce ActiveRecord to create a model. We use the model to persist our data. - -1. create a migration which will create a new `Task` model - - create the database schema and tables by running the `rails db:migrate` command - - the `Task` model should include _at least_ a name, a description and a completion date - - create at least 2 `Task` model instances using the `rails console` -1. update the controller's `index` action you created to retrieve and show `all` Task objects from the database - - you may need to update the view as well to use the model fields rather than the hard-coded data - -## Wave 2 - -In this wave, we will expand the actions we support and introduce forms for user interactivity and persistence. - -1. add support to `show` each task - - update the task list to link to a `show` action for each individual task - - create a route - - create a controller action - - create an ERB view -1. Create a new task: - - update the task list to have a link to add a new task - - this will give the user a new page with a **form** with the appropriate task fields - - the site should take the user back to the task list after the new task is added -1. Verify the success of your controller actions by uncommenting the wave 2 tests and executing them with `$ rails test`. - -## Wave 3 - -In this wave we will extend the interactivity with users, allowing them to edit existing tasks. - -1. Complete tests by uncommenting and filling in the contents of the Wave 3 tests for the `edit` and `update` actions. -1. Edit a task - - update each task's show page to include an edit link - - this will give the user a new page with a **form** that is pre-populated with the data about that task - - the site should take the user back to the task's show page after the task is updated - -1. **Optional** - - DRY up your code by reusing the view code from the `new` functionality - - Hint: Rendering _partials_ in Rails - -## Wave 4 - -In this wave, we will add the ability to delete tasks. We will also add the ability for a user to mark a task complete. Note: Marking a task complete will require going above and beyond the examples provided in lecture. You will also need to write controller tests for the delete and mark complete actions. - -1. Delete a task - On the task list, add a button or link for each task that will, once clicked: - 1. Ask the user to confirm that they definitely want to delete the task. - 1. Delete the task from the database and redirect the user back to the list of remaining tasks -1. Mark a task complete - - Add a button to the list of tasks on the home page that, when clicked, will mark a task complete - - Update the database with the task's completed date - -### Optional Design - -The focus of this project is to familiarize yourself with rails. Design of this application is optional and secondary to learning goals this project. If you do find you have time to style the design of your application, you can use or own design or the wireframes below. - -![Homepage Wireframe](/imgs/tasklist_homepage.jpg "Homepage Wireframe") +* ... diff --git a/Rakefile b/Rakefile new file mode 100644 index 000000000..e85f91391 --- /dev/null +++ b/Rakefile @@ -0,0 +1,6 @@ +# Add your own tasks in files placed in lib/tasks ending in .rake, +# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. + +require_relative 'config/application' + +Rails.application.load_tasks diff --git a/app/assets/config/manifest.js b/app/assets/config/manifest.js new file mode 100644 index 000000000..b16e53d6d --- /dev/null +++ b/app/assets/config/manifest.js @@ -0,0 +1,3 @@ +//= link_tree ../images +//= link_directory ../javascripts .js +//= link_directory ../stylesheets .css diff --git a/app/assets/images/.keep b/app/assets/images/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js new file mode 100644 index 000000000..82e6f0f6c --- /dev/null +++ b/app/assets/javascripts/application.js @@ -0,0 +1,16 @@ +// This is a manifest file that'll be compiled into application.js, which will include all the files +// listed below. +// +// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, or any plugin's +// vendor/assets/javascripts directory can be referenced here using a relative path. +// +// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the +// compiled file. JavaScript code in this file should be added after the last require_* statement. +// +// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details +// about supported directives. +// +//= require rails-ujs +//= require activestorage +//= require turbolinks +//= require_tree . diff --git a/app/assets/javascripts/cable.js b/app/assets/javascripts/cable.js new file mode 100644 index 000000000..739aa5f02 --- /dev/null +++ b/app/assets/javascripts/cable.js @@ -0,0 +1,13 @@ +// Action Cable provides the framework to deal with WebSockets in Rails. +// You can generate new channels where WebSocket features live using the `rails generate channel` command. +// +//= require action_cable +//= require_self +//= require_tree ./channels + +(function() { + this.App || (this.App = {}); + + App.cable = ActionCable.createConsumer(); + +}).call(this); diff --git a/app/assets/javascripts/channels/.keep b/app/assets/javascripts/channels/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css new file mode 100644 index 000000000..d05ea0f51 --- /dev/null +++ b/app/assets/stylesheets/application.css @@ -0,0 +1,15 @@ +/* + * This is a manifest file that'll be compiled into application.css, which will include all the files + * listed below. + * + * Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's + * vendor/assets/stylesheets directory can be referenced here using a relative path. + * + * You're free to add application-wide styles to this file and they'll appear at the bottom of the + * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS + * files in this directory. Styles in this file should be added after the last require_* statement. + * It is generally better to create a new file per style scope. + * + *= require_tree . + *= require_self + */ diff --git a/app/channels/application_cable/channel.rb b/app/channels/application_cable/channel.rb new file mode 100644 index 000000000..d67269728 --- /dev/null +++ b/app/channels/application_cable/channel.rb @@ -0,0 +1,4 @@ +module ApplicationCable + class Channel < ActionCable::Channel::Base + end +end diff --git a/app/channels/application_cable/connection.rb b/app/channels/application_cable/connection.rb new file mode 100644 index 000000000..0ff5442f4 --- /dev/null +++ b/app/channels/application_cable/connection.rb @@ -0,0 +1,4 @@ +module ApplicationCable + class Connection < ActionCable::Connection::Base + end +end diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb new file mode 100644 index 000000000..09705d12a --- /dev/null +++ b/app/controllers/application_controller.rb @@ -0,0 +1,2 @@ +class ApplicationController < ActionController::Base +end diff --git a/app/controllers/concerns/.keep b/app/controllers/concerns/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb new file mode 100644 index 000000000..de6be7945 --- /dev/null +++ b/app/helpers/application_helper.rb @@ -0,0 +1,2 @@ +module ApplicationHelper +end diff --git a/app/jobs/application_job.rb b/app/jobs/application_job.rb new file mode 100644 index 000000000..a009ace51 --- /dev/null +++ b/app/jobs/application_job.rb @@ -0,0 +1,2 @@ +class ApplicationJob < ActiveJob::Base +end diff --git a/app/mailers/application_mailer.rb b/app/mailers/application_mailer.rb new file mode 100644 index 000000000..286b2239d --- /dev/null +++ b/app/mailers/application_mailer.rb @@ -0,0 +1,4 @@ +class ApplicationMailer < ActionMailer::Base + default from: 'from@example.com' + layout 'mailer' +end diff --git a/app/models/application_record.rb b/app/models/application_record.rb new file mode 100644 index 000000000..10a4cba84 --- /dev/null +++ b/app/models/application_record.rb @@ -0,0 +1,3 @@ +class ApplicationRecord < ActiveRecord::Base + self.abstract_class = true +end diff --git a/app/models/concerns/.keep b/app/models/concerns/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb new file mode 100644 index 000000000..b9ce64348 --- /dev/null +++ b/app/views/layouts/application.html.erb @@ -0,0 +1,15 @@ + + + + TaskList + <%= csrf_meta_tags %> + <%= csp_meta_tag %> + + <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %> + <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %> + + + + <%= yield %> + + diff --git a/app/views/layouts/mailer.html.erb b/app/views/layouts/mailer.html.erb new file mode 100644 index 000000000..cbd34d2e9 --- /dev/null +++ b/app/views/layouts/mailer.html.erb @@ -0,0 +1,13 @@ + + + + + + + + + <%= yield %> + + diff --git a/app/views/layouts/mailer.text.erb b/app/views/layouts/mailer.text.erb new file mode 100644 index 000000000..37f0bddbd --- /dev/null +++ b/app/views/layouts/mailer.text.erb @@ -0,0 +1 @@ +<%= yield %> diff --git a/bin/bundle b/bin/bundle new file mode 100755 index 000000000..f19acf5b5 --- /dev/null +++ b/bin/bundle @@ -0,0 +1,3 @@ +#!/usr/bin/env ruby +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) +load Gem.bin_path('bundler', 'bundle') diff --git a/bin/rails b/bin/rails new file mode 100755 index 000000000..5badb2fde --- /dev/null +++ b/bin/rails @@ -0,0 +1,9 @@ +#!/usr/bin/env ruby +begin + load File.expand_path('../spring', __FILE__) +rescue LoadError => e + raise unless e.message.include?('spring') +end +APP_PATH = File.expand_path('../config/application', __dir__) +require_relative '../config/boot' +require 'rails/commands' diff --git a/bin/rake b/bin/rake new file mode 100755 index 000000000..d87d5f578 --- /dev/null +++ b/bin/rake @@ -0,0 +1,9 @@ +#!/usr/bin/env ruby +begin + load File.expand_path('../spring', __FILE__) +rescue LoadError => e + raise unless e.message.include?('spring') +end +require_relative '../config/boot' +require 'rake' +Rake.application.run diff --git a/bin/setup b/bin/setup new file mode 100755 index 000000000..94fd4d797 --- /dev/null +++ b/bin/setup @@ -0,0 +1,36 @@ +#!/usr/bin/env ruby +require 'fileutils' +include FileUtils + +# path to your application root. +APP_ROOT = File.expand_path('..', __dir__) + +def system!(*args) + system(*args) || abort("\n== Command #{args} failed ==") +end + +chdir APP_ROOT do + # This script is a starting point to setup your application. + # Add necessary setup steps to this file. + + puts '== Installing dependencies ==' + system! 'gem install bundler --conservative' + system('bundle check') || system!('bundle install') + + # Install JavaScript dependencies if using Yarn + # system('bin/yarn') + + # puts "\n== Copying sample files ==" + # unless File.exist?('config/database.yml') + # cp 'config/database.yml.sample', 'config/database.yml' + # end + + puts "\n== Preparing database ==" + system! 'bin/rails db:setup' + + puts "\n== Removing old logs and tempfiles ==" + system! 'bin/rails log:clear tmp:clear' + + puts "\n== Restarting application server ==" + system! 'bin/rails restart' +end diff --git a/bin/spring b/bin/spring new file mode 100755 index 000000000..fb2ec2ebb --- /dev/null +++ b/bin/spring @@ -0,0 +1,17 @@ +#!/usr/bin/env ruby + +# This file loads spring without using Bundler, in order to be fast. +# It gets overwritten when you run the `spring binstub` command. + +unless defined?(Spring) + require 'rubygems' + require 'bundler' + + lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read) + spring = lockfile.specs.detect { |spec| spec.name == "spring" } + if spring + Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path + gem 'spring', spring.version + require 'spring/binstub' + end +end diff --git a/bin/update b/bin/update new file mode 100755 index 000000000..58bfaed51 --- /dev/null +++ b/bin/update @@ -0,0 +1,31 @@ +#!/usr/bin/env ruby +require 'fileutils' +include FileUtils + +# path to your application root. +APP_ROOT = File.expand_path('..', __dir__) + +def system!(*args) + system(*args) || abort("\n== Command #{args} failed ==") +end + +chdir APP_ROOT do + # This script is a way to update your development environment automatically. + # Add necessary update steps to this file. + + puts '== Installing dependencies ==' + system! 'gem install bundler --conservative' + system('bundle check') || system!('bundle install') + + # Install JavaScript dependencies if using Yarn + # system('bin/yarn') + + puts "\n== Updating database ==" + system! 'bin/rails db:migrate' + + puts "\n== Removing old logs and tempfiles ==" + system! 'bin/rails log:clear tmp:clear' + + puts "\n== Restarting application server ==" + system! 'bin/rails restart' +end diff --git a/bin/yarn b/bin/yarn new file mode 100755 index 000000000..460dd565b --- /dev/null +++ b/bin/yarn @@ -0,0 +1,11 @@ +#!/usr/bin/env ruby +APP_ROOT = File.expand_path('..', __dir__) +Dir.chdir(APP_ROOT) do + begin + exec "yarnpkg", *ARGV + rescue Errno::ENOENT + $stderr.puts "Yarn executable was not detected in the system." + $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install" + exit 1 + end +end diff --git a/config.ru b/config.ru new file mode 100644 index 000000000..f7ba0b527 --- /dev/null +++ b/config.ru @@ -0,0 +1,5 @@ +# This file is used by Rack-based servers to start the application. + +require_relative 'config/environment' + +run Rails.application diff --git a/config/application.rb b/config/application.rb new file mode 100644 index 000000000..77b3ec01b --- /dev/null +++ b/config/application.rb @@ -0,0 +1,26 @@ +require_relative 'boot' + +require 'rails/all' + +# Require the gems listed in Gemfile, including any gems +# you've limited to :test, :development, or :production. +Bundler.require(*Rails.groups) + +module TaskList + class Application < Rails::Application + config.generators do |g| + # Force new test files to be generated in the minitest-spec style + g.test_framework :minitest, spec: true + + # Always use .js files, never .coffee + g.javascript_engine :js + end + # Initialize configuration defaults for originally generated Rails version. + config.load_defaults 5.2 + + # Settings in config/environments/* take precedence over those specified here. + # Application configuration can go into files in config/initializers + # -- all .rb files in that directory are automatically loaded after loading + # the framework and any gems in your application. + end +end diff --git a/config/boot.rb b/config/boot.rb new file mode 100644 index 000000000..b9e460cef --- /dev/null +++ b/config/boot.rb @@ -0,0 +1,4 @@ +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) + +require 'bundler/setup' # Set up gems listed in the Gemfile. +require 'bootsnap/setup' # Speed up boot time by caching expensive operations. diff --git a/config/cable.yml b/config/cable.yml new file mode 100644 index 000000000..51266cdbe --- /dev/null +++ b/config/cable.yml @@ -0,0 +1,10 @@ +development: + adapter: async + +test: + adapter: async + +production: + adapter: redis + url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %> + channel_prefix: TaskList_production diff --git a/config/credentials.yml.enc b/config/credentials.yml.enc new file mode 100644 index 000000000..ecd668a2a --- /dev/null +++ b/config/credentials.yml.enc @@ -0,0 +1 @@ +gp7WKL4NCo4QwwohdHdstmxsnjSIOHPJWakskGOD38+IT02JlFbEyHfEnBreLYWyBGuN/ewxXoiqQ9OpXpsdxzEj56MhPjTBuu7+tMUiAvgi3SFs8XjCSHSs0kpKXWTHUpmrjErRqqN9mw2MuEGLragMbGZgF6nr+3h5sIJu97coVkPFVy3nU9ArqIDGwfMWpwtJeGQNxWPq+qA4hzi1P81jyCnparzAdAn69h48K9YWn2D/MpHQFmSjaY8iOELqssrB90fBzfW9BrcF2AuUTnZSsykkPljsL2mPsdmW9/h/rE3D2A980QAFB0NkBjRdxOtAp7PyaSzzwot29jHFAw97vzPRjJv/xO25bEs+mwi12882absvhtnOdlQs2FqxEDFLHrDT++7XGDiqAZ1oHRQGHyl4ZjVR1NuY--C3eaW4ZLPYajB0/v--GFRmzirz1KubekzB8dJe8A== \ No newline at end of file diff --git a/config/database.yml b/config/database.yml new file mode 100644 index 000000000..40243c8b5 --- /dev/null +++ b/config/database.yml @@ -0,0 +1,85 @@ +# PostgreSQL. Versions 9.1 and up are supported. +# +# Install the pg driver: +# gem install pg +# On OS X with Homebrew: +# gem install pg -- --with-pg-config=/usr/local/bin/pg_config +# On OS X with MacPorts: +# gem install pg -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config +# On Windows: +# gem install pg +# Choose the win32 build. +# Install PostgreSQL and put its /bin directory on your path. +# +# Configure Using Gemfile +# gem 'pg' +# +default: &default + adapter: postgresql + encoding: unicode + # For details on connection pooling, see Rails configuration guide + # http://guides.rubyonrails.org/configuring.html#database-pooling + pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> + +development: + <<: *default + database: TaskList_development + + # The specified database role being used to connect to postgres. + # To create additional roles in postgres see `$ createuser --help`. + # When left blank, postgres will use the default role. This is + # the same name as the operating system user that initialized the database. + #username: TaskList + + # The password associated with the postgres role (username). + #password: + + # Connect on a TCP socket. Omitted by default since the client uses a + # domain socket that doesn't need configuration. Windows does not have + # domain sockets, so uncomment these lines. + #host: localhost + + # The TCP port the server listens on. Defaults to 5432. + # If your server runs on a different port number, change accordingly. + #port: 5432 + + # Schema search path. The server defaults to $user,public + #schema_search_path: myapp,sharedapp,public + + # Minimum log levels, in increasing order: + # debug5, debug4, debug3, debug2, debug1, + # log, notice, warning, error, fatal, and panic + # Defaults to warning. + #min_messages: notice + +# Warning: The database defined as "test" will be erased and +# re-generated from your development database when you run "rake". +# Do not set this db to the same as development or production. +test: + <<: *default + database: TaskList_test + +# As with config/secrets.yml, you never want to store sensitive information, +# like your database password, in your source code. If your source code is +# ever seen by anyone, they now have access to your database. +# +# Instead, provide the password as a unix environment variable when you boot +# the app. Read http://guides.rubyonrails.org/configuring.html#configuring-a-database +# for a full rundown on how to provide these environment variables in a +# production deployment. +# +# On Heroku and other platform providers, you may have a full connection URL +# available as an environment variable. For example: +# +# DATABASE_URL="postgres://myuser:mypass@localhost/somedatabase" +# +# You can use this database configuration with: +# +# production: +# url: <%= ENV['DATABASE_URL'] %> +# +production: + <<: *default + database: TaskList_production + username: TaskList + password: <%= ENV['TASKLIST_DATABASE_PASSWORD'] %> diff --git a/config/environment.rb b/config/environment.rb new file mode 100644 index 000000000..426333bb4 --- /dev/null +++ b/config/environment.rb @@ -0,0 +1,5 @@ +# Load the Rails application. +require_relative 'application' + +# Initialize the Rails application. +Rails.application.initialize! diff --git a/config/environments/development.rb b/config/environments/development.rb new file mode 100644 index 000000000..1311e3e4e --- /dev/null +++ b/config/environments/development.rb @@ -0,0 +1,61 @@ +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # In the development environment your application's code is reloaded on + # every request. This slows down response time but is perfect for development + # since you don't have to restart the web server when you make code changes. + config.cache_classes = false + + # Do not eager load code on boot. + config.eager_load = false + + # Show full error reports. + config.consider_all_requests_local = true + + # Enable/disable caching. By default caching is disabled. + # Run rails dev:cache to toggle caching. + if Rails.root.join('tmp', 'caching-dev.txt').exist? + config.action_controller.perform_caching = true + + config.cache_store = :memory_store + config.public_file_server.headers = { + 'Cache-Control' => "public, max-age=#{2.days.to_i}" + } + else + config.action_controller.perform_caching = false + + config.cache_store = :null_store + end + + # Store uploaded files on the local file system (see config/storage.yml for options) + config.active_storage.service = :local + + # Don't care if the mailer can't send. + config.action_mailer.raise_delivery_errors = false + + config.action_mailer.perform_caching = false + + # Print deprecation notices to the Rails logger. + config.active_support.deprecation = :log + + # Raise an error on page load if there are pending migrations. + config.active_record.migration_error = :page_load + + # Highlight code that triggered database queries in logs. + config.active_record.verbose_query_logs = true + + # Debug mode disables concatenation and preprocessing of assets. + # This option may cause significant delays in view rendering with a large + # number of complex assets. + config.assets.debug = true + + # Suppress logger output for asset requests. + config.assets.quiet = true + + # Raises error for missing translations + # config.action_view.raise_on_missing_translations = true + + # Use an evented file watcher to asynchronously detect changes in source code, + # routes, locales, etc. This feature depends on the listen gem. + config.file_watcher = ActiveSupport::EventedFileUpdateChecker +end diff --git a/config/environments/production.rb b/config/environments/production.rb new file mode 100644 index 000000000..4cef70af5 --- /dev/null +++ b/config/environments/production.rb @@ -0,0 +1,94 @@ +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # Code is not reloaded between requests. + config.cache_classes = true + + # Eager load code on boot. This eager loads most of Rails and + # your application in memory, allowing both threaded web servers + # and those relying on copy on write to perform better. + # Rake tasks automatically ignore this option for performance. + config.eager_load = true + + # Full error reports are disabled and caching is turned on. + config.consider_all_requests_local = false + config.action_controller.perform_caching = true + + # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"] + # or in config/master.key. This key is used to decrypt credentials (and other encrypted files). + # config.require_master_key = true + + # Disable serving static files from the `/public` folder by default since + # Apache or NGINX already handles this. + config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? + + # Compress JavaScripts and CSS. + config.assets.js_compressor = :uglifier + # config.assets.css_compressor = :sass + + # Do not fallback to assets pipeline if a precompiled asset is missed. + config.assets.compile = false + + # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb + + # Enable serving of images, stylesheets, and JavaScripts from an asset server. + # config.action_controller.asset_host = 'http://assets.example.com' + + # Specifies the header that your server uses for sending files. + # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache + # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX + + # Store uploaded files on the local file system (see config/storage.yml for options) + config.active_storage.service = :local + + # Mount Action Cable outside main process or domain + # config.action_cable.mount_path = nil + # config.action_cable.url = 'wss://example.com/cable' + # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ] + + # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. + # config.force_ssl = true + + # Use the lowest log level to ensure availability of diagnostic information + # when problems arise. + config.log_level = :debug + + # Prepend all log lines with the following tags. + config.log_tags = [ :request_id ] + + # Use a different cache store in production. + # config.cache_store = :mem_cache_store + + # Use a real queuing backend for Active Job (and separate queues per environment) + # config.active_job.queue_adapter = :resque + # config.active_job.queue_name_prefix = "TaskList_#{Rails.env}" + + config.action_mailer.perform_caching = false + + # Ignore bad email addresses and do not raise email delivery errors. + # Set this to true and configure the email server for immediate delivery to raise delivery errors. + # config.action_mailer.raise_delivery_errors = false + + # Enable locale fallbacks for I18n (makes lookups for any locale fall back to + # the I18n.default_locale when a translation cannot be found). + config.i18n.fallbacks = true + + # Send deprecation notices to registered listeners. + config.active_support.deprecation = :notify + + # Use default logging formatter so that PID and timestamp are not suppressed. + config.log_formatter = ::Logger::Formatter.new + + # Use a different logger for distributed setups. + # require 'syslog/logger' + # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name') + + if ENV["RAILS_LOG_TO_STDOUT"].present? + logger = ActiveSupport::Logger.new(STDOUT) + logger.formatter = config.log_formatter + config.logger = ActiveSupport::TaggedLogging.new(logger) + end + + # Do not dump schema after migrations. + config.active_record.dump_schema_after_migration = false +end diff --git a/config/environments/test.rb b/config/environments/test.rb new file mode 100644 index 000000000..0a38fd3ce --- /dev/null +++ b/config/environments/test.rb @@ -0,0 +1,46 @@ +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # The test environment is used exclusively to run your application's + # test suite. You never need to work with it otherwise. Remember that + # your test database is "scratch space" for the test suite and is wiped + # and recreated between test runs. Don't rely on the data there! + config.cache_classes = true + + # Do not eager load code on boot. This avoids loading your whole application + # just for the purpose of running a single test. If you are using a tool that + # preloads Rails for running tests, you may have to set it to true. + config.eager_load = false + + # Configure public file server for tests with Cache-Control for performance. + config.public_file_server.enabled = true + config.public_file_server.headers = { + 'Cache-Control' => "public, max-age=#{1.hour.to_i}" + } + + # Show full error reports and disable caching. + config.consider_all_requests_local = true + config.action_controller.perform_caching = false + + # Raise exceptions instead of rendering exception templates. + config.action_dispatch.show_exceptions = false + + # Disable request forgery protection in test environment. + config.action_controller.allow_forgery_protection = false + + # Store uploaded files on the local file system in a temporary directory + config.active_storage.service = :test + + config.action_mailer.perform_caching = false + + # Tell Action Mailer not to deliver emails to the real world. + # The :test delivery method accumulates sent emails in the + # ActionMailer::Base.deliveries array. + config.action_mailer.delivery_method = :test + + # Print deprecation notices to the stderr. + config.active_support.deprecation = :stderr + + # Raises error for missing translations + # config.action_view.raise_on_missing_translations = true +end diff --git a/config/initializers/action_view.rb b/config/initializers/action_view.rb new file mode 100644 index 000000000..142d382f8 --- /dev/null +++ b/config/initializers/action_view.rb @@ -0,0 +1 @@ +Rails.application.config.action_view.form_with_generates_remote_forms = false diff --git a/config/initializers/application_controller_renderer.rb b/config/initializers/application_controller_renderer.rb new file mode 100644 index 000000000..89d2efab2 --- /dev/null +++ b/config/initializers/application_controller_renderer.rb @@ -0,0 +1,8 @@ +# Be sure to restart your server when you modify this file. + +# ActiveSupport::Reloader.to_prepare do +# ApplicationController.renderer.defaults.merge!( +# http_host: 'example.org', +# https: false +# ) +# end diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb new file mode 100644 index 000000000..4b828e80c --- /dev/null +++ b/config/initializers/assets.rb @@ -0,0 +1,14 @@ +# Be sure to restart your server when you modify this file. + +# Version of your assets, change this if you want to expire all your assets. +Rails.application.config.assets.version = '1.0' + +# Add additional assets to the asset load path. +# Rails.application.config.assets.paths << Emoji.images_path +# Add Yarn node_modules folder to the asset load path. +Rails.application.config.assets.paths << Rails.root.join('node_modules') + +# Precompile additional assets. +# application.js, application.css, and all non-JS/CSS in the app/assets +# folder are already added. +# Rails.application.config.assets.precompile += %w( admin.js admin.css ) diff --git a/config/initializers/backtrace_silencers.rb b/config/initializers/backtrace_silencers.rb new file mode 100644 index 000000000..59385cdf3 --- /dev/null +++ b/config/initializers/backtrace_silencers.rb @@ -0,0 +1,7 @@ +# Be sure to restart your server when you modify this file. + +# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. +# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } + +# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. +# Rails.backtrace_cleaner.remove_silencers! diff --git a/config/initializers/content_security_policy.rb b/config/initializers/content_security_policy.rb new file mode 100644 index 000000000..d3bcaa5ec --- /dev/null +++ b/config/initializers/content_security_policy.rb @@ -0,0 +1,25 @@ +# Be sure to restart your server when you modify this file. + +# Define an application-wide content security policy +# For further information see the following documentation +# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy + +# Rails.application.config.content_security_policy do |policy| +# policy.default_src :self, :https +# policy.font_src :self, :https, :data +# policy.img_src :self, :https, :data +# policy.object_src :none +# policy.script_src :self, :https +# policy.style_src :self, :https + +# # Specify URI for violation reports +# # policy.report_uri "/csp-violation-report-endpoint" +# end + +# If you are using UJS then enable automatic nonce generation +# Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) } + +# Report CSP violations to a specified URI +# For further information see the following documentation: +# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only +# Rails.application.config.content_security_policy_report_only = true diff --git a/config/initializers/cookies_serializer.rb b/config/initializers/cookies_serializer.rb new file mode 100644 index 000000000..5a6a32d37 --- /dev/null +++ b/config/initializers/cookies_serializer.rb @@ -0,0 +1,5 @@ +# Be sure to restart your server when you modify this file. + +# Specify a serializer for the signed and encrypted cookie jars. +# Valid options are :json, :marshal, and :hybrid. +Rails.application.config.action_dispatch.cookies_serializer = :json diff --git a/config/initializers/filter_parameter_logging.rb b/config/initializers/filter_parameter_logging.rb new file mode 100644 index 000000000..4a994e1e7 --- /dev/null +++ b/config/initializers/filter_parameter_logging.rb @@ -0,0 +1,4 @@ +# Be sure to restart your server when you modify this file. + +# Configure sensitive parameters which will be filtered from the log file. +Rails.application.config.filter_parameters += [:password] diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb new file mode 100644 index 000000000..ac033bf9d --- /dev/null +++ b/config/initializers/inflections.rb @@ -0,0 +1,16 @@ +# Be sure to restart your server when you modify this file. + +# Add new inflection rules using the following format. Inflections +# are locale specific, and you may define rules for as many different +# locales as you wish. All of these examples are active by default: +# ActiveSupport::Inflector.inflections(:en) do |inflect| +# inflect.plural /^(ox)$/i, '\1en' +# inflect.singular /^(ox)en/i, '\1' +# inflect.irregular 'person', 'people' +# inflect.uncountable %w( fish sheep ) +# end + +# These inflection rules are supported but not enabled by default: +# ActiveSupport::Inflector.inflections(:en) do |inflect| +# inflect.acronym 'RESTful' +# end diff --git a/config/initializers/mime_types.rb b/config/initializers/mime_types.rb new file mode 100644 index 000000000..dc1899682 --- /dev/null +++ b/config/initializers/mime_types.rb @@ -0,0 +1,4 @@ +# Be sure to restart your server when you modify this file. + +# Add new mime types for use in respond_to blocks: +# Mime::Type.register "text/richtext", :rtf diff --git a/config/initializers/wrap_parameters.rb b/config/initializers/wrap_parameters.rb new file mode 100644 index 000000000..bbfc3961b --- /dev/null +++ b/config/initializers/wrap_parameters.rb @@ -0,0 +1,14 @@ +# Be sure to restart your server when you modify this file. + +# This file contains settings for ActionController::ParamsWrapper which +# is enabled by default. + +# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. +ActiveSupport.on_load(:action_controller) do + wrap_parameters format: [:json] +end + +# To enable root element in JSON for ActiveRecord objects. +# ActiveSupport.on_load(:active_record) do +# self.include_root_in_json = true +# end diff --git a/config/locales/en.yml b/config/locales/en.yml new file mode 100644 index 000000000..decc5a857 --- /dev/null +++ b/config/locales/en.yml @@ -0,0 +1,33 @@ +# Files in the config/locales directory are used for internationalization +# and are automatically loaded by Rails. If you want to use locales other +# than English, add the necessary files in this directory. +# +# To use the locales, use `I18n.t`: +# +# I18n.t 'hello' +# +# In views, this is aliased to just `t`: +# +# <%= t('hello') %> +# +# To use a different locale, set it with `I18n.locale`: +# +# I18n.locale = :es +# +# This would use the information in config/locales/es.yml. +# +# The following keys must be escaped otherwise they will not be retrieved by +# the default I18n backend: +# +# true, false, on, off, yes, no +# +# Instead, surround them with single quotes. +# +# en: +# 'true': 'foo' +# +# To learn more, please read the Rails Internationalization guide +# available at http://guides.rubyonrails.org/i18n.html. + +en: + hello: "Hello world" diff --git a/config/puma.rb b/config/puma.rb new file mode 100644 index 000000000..a5eccf816 --- /dev/null +++ b/config/puma.rb @@ -0,0 +1,34 @@ +# Puma can serve each request in a thread from an internal thread pool. +# The `threads` method setting takes two numbers: a minimum and maximum. +# Any libraries that use thread pools should be configured to match +# the maximum value specified for Puma. Default is set to 5 threads for minimum +# and maximum; this matches the default thread size of Active Record. +# +threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 } +threads threads_count, threads_count + +# Specifies the `port` that Puma will listen on to receive requests; default is 3000. +# +port ENV.fetch("PORT") { 3000 } + +# Specifies the `environment` that Puma will run in. +# +environment ENV.fetch("RAILS_ENV") { "development" } + +# Specifies the number of `workers` to boot in clustered mode. +# Workers are forked webserver processes. If using threads and workers together +# the concurrency of the application would be max `threads` * `workers`. +# Workers do not work on JRuby or Windows (both of which do not support +# processes). +# +# workers ENV.fetch("WEB_CONCURRENCY") { 2 } + +# Use the `preload_app!` method when specifying a `workers` number. +# This directive tells Puma to first boot the application and load code +# before forking the application. This takes advantage of Copy On Write +# process behavior so workers use less memory. +# +# preload_app! + +# Allow puma to be restarted by `rails restart` command. +plugin :tmp_restart diff --git a/config/routes.rb b/config/routes.rb new file mode 100644 index 000000000..787824f88 --- /dev/null +++ b/config/routes.rb @@ -0,0 +1,3 @@ +Rails.application.routes.draw do + # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html +end diff --git a/config/spring.rb b/config/spring.rb new file mode 100644 index 000000000..9fa7863f9 --- /dev/null +++ b/config/spring.rb @@ -0,0 +1,6 @@ +%w[ + .ruby-version + .rbenv-vars + tmp/restart.txt + tmp/caching-dev.txt +].each { |path| Spring.watch(path) } diff --git a/config/storage.yml b/config/storage.yml new file mode 100644 index 000000000..d32f76e8f --- /dev/null +++ b/config/storage.yml @@ -0,0 +1,34 @@ +test: + service: Disk + root: <%= Rails.root.join("tmp/storage") %> + +local: + service: Disk + root: <%= Rails.root.join("storage") %> + +# Use rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key) +# amazon: +# service: S3 +# access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %> +# secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %> +# region: us-east-1 +# bucket: your_own_bucket + +# Remember not to checkin your GCS keyfile to a repository +# google: +# service: GCS +# project: your_project +# credentials: <%= Rails.root.join("path/to/gcs.keyfile") %> +# bucket: your_own_bucket + +# Use rails credentials:edit to set the Azure Storage secret (as azure_storage:storage_access_key) +# microsoft: +# service: AzureStorage +# storage_account_name: your_account_name +# storage_access_key: <%= Rails.application.credentials.dig(:azure_storage, :storage_access_key) %> +# container: your_container_name + +# mirror: +# service: Mirror +# primary: local +# mirrors: [ amazon, google, microsoft ] diff --git a/db/seeds.rb b/db/seeds.rb new file mode 100644 index 000000000..1beea2acc --- /dev/null +++ b/db/seeds.rb @@ -0,0 +1,7 @@ +# This file should contain all the record creation needed to seed the database with its default values. +# The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup). +# +# Examples: +# +# movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }]) +# Character.create(name: 'Luke', movie: movies.first) diff --git a/lib/assets/.keep b/lib/assets/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/lib/tasks/.keep b/lib/tasks/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/log/.keep b/log/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/log/development.log b/log/development.log new file mode 100644 index 000000000..e69de29bb diff --git a/package.json b/package.json new file mode 100644 index 000000000..f9cbc5515 --- /dev/null +++ b/package.json @@ -0,0 +1,5 @@ +{ + "name": "TaskList", + "private": true, + "dependencies": {} +} diff --git a/public/404.html b/public/404.html new file mode 100644 index 000000000..2be3af26f --- /dev/null +++ b/public/404.html @@ -0,0 +1,67 @@ + + + + The page you were looking for doesn't exist (404) + + + + + + +
+
+

The page you were looking for doesn't exist.

+

You may have mistyped the address or the page may have moved.

+
+

If you are the application owner check the logs for more information.

+
+ + diff --git a/public/422.html b/public/422.html new file mode 100644 index 000000000..c08eac0d1 --- /dev/null +++ b/public/422.html @@ -0,0 +1,67 @@ + + + + The change you wanted was rejected (422) + + + + + + +
+
+

The change you wanted was rejected.

+

Maybe you tried to change something you didn't have access to.

+
+

If you are the application owner check the logs for more information.

+
+ + diff --git a/public/500.html b/public/500.html new file mode 100644 index 000000000..78a030af2 --- /dev/null +++ b/public/500.html @@ -0,0 +1,66 @@ + + + + We're sorry, but something went wrong (500) + + + + + + +
+
+

We're sorry, but something went wrong.

+
+

If you are the application owner check the logs for more information.

+
+ + diff --git a/public/apple-touch-icon-precomposed.png b/public/apple-touch-icon-precomposed.png new file mode 100644 index 000000000..e69de29bb diff --git a/public/apple-touch-icon.png b/public/apple-touch-icon.png new file mode 100644 index 000000000..e69de29bb diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 000000000..e69de29bb diff --git a/public/robots.txt b/public/robots.txt new file mode 100644 index 000000000..37b576a4a --- /dev/null +++ b/public/robots.txt @@ -0,0 +1 @@ +# See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file diff --git a/storage/.keep b/storage/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/test/application_system_test_case.rb b/test/application_system_test_case.rb new file mode 100644 index 000000000..d19212abd --- /dev/null +++ b/test/application_system_test_case.rb @@ -0,0 +1,5 @@ +require "test_helper" + +class ApplicationSystemTestCase < ActionDispatch::SystemTestCase + driven_by :selenium, using: :chrome, screen_size: [1400, 1400] +end diff --git a/test/fixtures/.keep b/test/fixtures/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/test/fixtures/files/.keep b/test/fixtures/files/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/test/helpers/.keep b/test/helpers/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/test/integration/.keep b/test/integration/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/test/mailers/.keep b/test/mailers/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/test/models/.keep b/test/models/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/test/system/.keep b/test/system/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/test/test_helper.rb b/test/test_helper.rb new file mode 100644 index 000000000..10594a324 --- /dev/null +++ b/test/test_helper.rb @@ -0,0 +1,26 @@ +ENV["RAILS_ENV"] = "test" +require File.expand_path("../../config/environment", __FILE__) +require "rails/test_help" +require "minitest/rails" +require "minitest/reporters" # for Colorized output + +# For colorful output! +Minitest::Reporters.use!( + Minitest::Reporters::SpecReporter.new, + ENV, + Minitest.backtrace_filter +) + + +# To add Capybara feature tests add `gem "minitest-rails-capybara"` +# to the test group in the Gemfile and uncomment the following: +# require "minitest/rails/capybara" + +# Uncomment for awesome colorful output +# require "minitest/pride" + +class ActiveSupport::TestCase + # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. + fixtures :all + # Add more helper methods to be used by all tests here... +end diff --git a/vendor/.keep b/vendor/.keep new file mode 100644 index 000000000..e69de29bb From ac13bfadbe75c956e1d46dc7063a49d38505dadf Mon Sep 17 00:00:00 2001 From: Bitaman Date: Mon, 8 Apr 2019 12:30:10 -0700 Subject: [PATCH 02/16] created the task controller --- app/assets/javascripts/tasks.js | 2 ++ app/assets/stylesheets/tasks.scss | 3 +++ app/controllers/tasks_controller.rb | 4 ++++ app/helpers/tasks_helper.rb | 2 ++ log/development.log | 18 ++++++++++++++++++ 5 files changed, 29 insertions(+) create mode 100644 app/assets/javascripts/tasks.js create mode 100644 app/assets/stylesheets/tasks.scss create mode 100644 app/controllers/tasks_controller.rb create mode 100644 app/helpers/tasks_helper.rb diff --git a/app/assets/javascripts/tasks.js b/app/assets/javascripts/tasks.js new file mode 100644 index 000000000..dee720fac --- /dev/null +++ b/app/assets/javascripts/tasks.js @@ -0,0 +1,2 @@ +// Place all the behaviors and hooks related to the matching controller here. +// All this logic will automatically be available in application.js. diff --git a/app/assets/stylesheets/tasks.scss b/app/assets/stylesheets/tasks.scss new file mode 100644 index 000000000..c5e7712d4 --- /dev/null +++ b/app/assets/stylesheets/tasks.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the Tasks controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/controllers/tasks_controller.rb b/app/controllers/tasks_controller.rb new file mode 100644 index 000000000..fe5d63365 --- /dev/null +++ b/app/controllers/tasks_controller.rb @@ -0,0 +1,4 @@ +class TasksController < ApplicationController + def index + end +end diff --git a/app/helpers/tasks_helper.rb b/app/helpers/tasks_helper.rb new file mode 100644 index 000000000..ce894d00c --- /dev/null +++ b/app/helpers/tasks_helper.rb @@ -0,0 +1,2 @@ +module TasksHelper +end diff --git a/log/development.log b/log/development.log index e69de29bb..d330e4605 100644 --- a/log/development.log +++ b/log/development.log @@ -0,0 +1,18 @@ +  (519.6ms) CREATE DATABASE "TaskList_development" ENCODING = 'unicode' + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:273 +  (370.4ms) CREATE DATABASE "TaskList_test" ENCODING = 'unicode' + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:273 +Started GET "/" for ::1 at 2019-04-08 12:23:21 -0700 +Processing by Rails::WelcomeController#index as HTML + Rendering /Users/bitaamani/.rvm/gems/ruby-2.6.0/gems/railties-5.2.3/lib/rails/templates/rails/welcome/index.html.erb + Rendered /Users/bitaamani/.rvm/gems/ruby-2.6.0/gems/railties-5.2.3/lib/rails/templates/rails/welcome/index.html.erb (4.3ms) +Completed 200 OK in 18ms (Views: 11.9ms | ActiveRecord: 0.0ms) + + +Started GET "/" for ::1 at 2019-04-08 12:23:38 -0700 +Processing by Rails::WelcomeController#index as HTML + Rendering /Users/bitaamani/.rvm/gems/ruby-2.6.0/gems/railties-5.2.3/lib/rails/templates/rails/welcome/index.html.erb + Rendered /Users/bitaamani/.rvm/gems/ruby-2.6.0/gems/railties-5.2.3/lib/rails/templates/rails/welcome/index.html.erb (3.4ms) +Completed 200 OK in 9ms (Views: 5.8ms | ActiveRecord: 0.0ms) + + From 6faa7881c6c6cfe736deb9a95777b7f77b56991c Mon Sep 17 00:00:00 2001 From: Bitaman Date: Mon, 8 Apr 2019 14:30:48 -0700 Subject: [PATCH 03/16] created the route --- config/routes.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/config/routes.rb b/config/routes.rb index 787824f88..bb75537f5 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,3 +1,4 @@ Rails.application.routes.draw do # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html + get "/tasks" , to: "tasks#index" end From b02540b1b6c3f724273c65430e6f24d46acef12d Mon Sep 17 00:00:00 2001 From: Bitaman Date: Tue, 9 Apr 2019 16:47:14 -0700 Subject: [PATCH 04/16] generated the task model and run the migration --- app/controllers/tasks_controller.rb | 18 +++ app/models/task.rb | 2 + app/views/tasks/index.html.erb | 12 ++ app/views/tasks/show.html.erb | 8 + config/routes.rb | 1 + db/migrate/20190409232440_create_tasks.rb | 11 ++ db/schema.rb | 26 ++++ log/development.log | 180 ++++++++++++++++++++++ test/fixtures/tasks.yml | 11 ++ test/models/task_test.rb | 9 ++ 10 files changed, 278 insertions(+) create mode 100644 app/models/task.rb create mode 100644 app/views/tasks/index.html.erb create mode 100644 app/views/tasks/show.html.erb create mode 100644 db/migrate/20190409232440_create_tasks.rb create mode 100644 db/schema.rb create mode 100644 test/fixtures/tasks.yml create mode 100644 test/models/task_test.rb diff --git a/app/controllers/tasks_controller.rb b/app/controllers/tasks_controller.rb index fe5d63365..adbdcebfb 100644 --- a/app/controllers/tasks_controller.rb +++ b/app/controllers/tasks_controller.rb @@ -1,4 +1,22 @@ + + + class TasksController < ApplicationController + def index + @tasks = TASKS + end + +def show + task_id = params[:id] + puts "Task ID was #{task_id}" + puts "result of .to_i: #{task_id.to_i}" + @task = TASKS[task_id.to_i] + + unless @task + head :not_found + end +end + end diff --git a/app/models/task.rb b/app/models/task.rb new file mode 100644 index 000000000..3c2342421 --- /dev/null +++ b/app/models/task.rb @@ -0,0 +1,2 @@ +class Task < ApplicationRecord +end diff --git a/app/views/tasks/index.html.erb b/app/views/tasks/index.html.erb new file mode 100644 index 000000000..2ff7086e7 --- /dev/null +++ b/app/views/tasks/index.html.erb @@ -0,0 +1,12 @@ +

Hello, this is my task list

+ +

There are <%= @tasks.length %> tasks to do.

+ + +
    +<% @tasks.each do |task|%> +
  • +<%= task.name %> : <%= task.description %> +
  • +<% end %> +
\ No newline at end of file diff --git a/app/views/tasks/show.html.erb b/app/views/tasks/show.html.erb new file mode 100644 index 000000000..048cc0d1d --- /dev/null +++ b/app/views/tasks/show.html.erb @@ -0,0 +1,8 @@ +

Task details page

+ +

+Day: <%= @task[:day] %> +

+

+Task: <%= @task[:task] %> +

\ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index bb75537f5..f401386cd 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,4 +1,5 @@ Rails.application.routes.draw do # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html get "/tasks" , to: "tasks#index" + get "/tasks/:id" , to: "tasks#show" end diff --git a/db/migrate/20190409232440_create_tasks.rb b/db/migrate/20190409232440_create_tasks.rb new file mode 100644 index 000000000..41481dbda --- /dev/null +++ b/db/migrate/20190409232440_create_tasks.rb @@ -0,0 +1,11 @@ +class CreateTasks < ActiveRecord::Migration[5.2] + def change + create_table :tasks do |t| + t.string :name + t.string :description + t.datetime :completion_date + + t.timestamps + end + end +end diff --git a/db/schema.rb b/db/schema.rb new file mode 100644 index 000000000..be432008d --- /dev/null +++ b/db/schema.rb @@ -0,0 +1,26 @@ +# This file is auto-generated from the current state of the database. Instead +# of editing this file, please use the migrations feature of Active Record to +# incrementally modify your database, and then regenerate this schema definition. +# +# Note that this schema.rb definition is the authoritative source for your +# database schema. If you need to create the application database on another +# system, you should be using db:schema:load, not running all the migrations +# from scratch. The latter is a flawed and unsustainable approach (the more migrations +# you'll amass, the slower it'll run and the greater likelihood for issues). +# +# It's strongly recommended that you check this file into your version control system. + +ActiveRecord::Schema.define(version: 2019_04_09_232440) do + + # These are extensions that must be enabled in order to support this database + enable_extension "plpgsql" + + create_table "tasks", force: :cascade do |t| + t.string "name" + t.string "description" + t.datetime "completion_date" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + +end diff --git a/log/development.log b/log/development.log index d330e4605..d3d786192 100644 --- a/log/development.log +++ b/log/development.log @@ -16,3 +16,183 @@ Processing by Rails::WelcomeController#index as HTML Completed 200 OK in 9ms (Views: 5.8ms | ActiveRecord: 0.0ms) +Started GET "/" for ::1 at 2019-04-08 14:52:21 -0700 +Processing by Rails::WelcomeController#index as HTML + Rendering /Users/bitaamani/.rvm/gems/ruby-2.6.0/gems/railties-5.2.3/lib/rails/templates/rails/welcome/index.html.erb + Rendered /Users/bitaamani/.rvm/gems/ruby-2.6.0/gems/railties-5.2.3/lib/rails/templates/rails/welcome/index.html.erb (3.6ms) +Completed 200 OK in 8ms (Views: 5.6ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for ::1 at 2019-04-08 14:52:32 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (1.2ms) +Completed 200 OK in 358ms (Views: 354.6ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for ::1 at 2019-04-08 15:23:17 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (0.7ms) +Completed 200 OK in 41ms (Views: 37.8ms | ActiveRecord: 0.0ms) + + +Started GET "/" for ::1 at 2019-04-09 08:53:37 -0700 +Processing by Rails::WelcomeController#index as HTML + Rendering /Users/bitaamani/.rvm/gems/ruby-2.6.0/gems/railties-5.2.3/lib/rails/templates/rails/welcome/index.html.erb + Rendered /Users/bitaamani/.rvm/gems/ruby-2.6.0/gems/railties-5.2.3/lib/rails/templates/rails/welcome/index.html.erb (6.5ms) +Completed 200 OK in 14ms (Views: 9.4ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for ::1 at 2019-04-09 08:53:46 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (0.8ms) +Completed 200 OK in 42ms (Views: 39.3ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for ::1 at 2019-04-09 08:55:26 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (0.6ms) +Completed 200 OK in 19ms (Views: 17.3ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for ::1 at 2019-04-09 08:55:48 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (0.6ms) +Completed 200 OK in 19ms (Views: 17.4ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for ::1 at 2019-04-09 13:17:09 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (3.3ms) +Completed 500 Internal Server Error in 12ms (ActiveRecord: 0.0ms) + + + +SyntaxError - syntax error, unexpected do +'.freeze; if @to-do-task + ^~ +/Users/bitaamani/Documents/homework/projects/ruby-projects/TaskList/app/views/tasks/index.html.erb:5: syntax error, unexpected do +...;@output_buffer.append=( @to-do-task[:task] );@output_buffer... +... ^~ +/Users/bitaamani/Documents/homework/projects/ruby-projects/TaskList/app/views/tasks/index.html.erb:5: syntax error, unexpected do +...;@output_buffer.append=( @to-do-task[:day]);@output_buffer.s... +... ^~ +/Users/bitaamani/Documents/homework/projects/ruby-projects/TaskList/app/views/tasks/index.html.erb:7: else without rescue is useless +'.freeze; else + ^~~~ +/Users/bitaamani/Documents/homework/projects/ruby-projects/TaskList/app/views/tasks/index.html.erb:20: syntax error, unexpected ensure, expecting end-of-input + ensure + ^~~~~~: + app/views/tasks/index.html.erb:3:in `' + +Started POST "/__better_errors/1e9857775111b715/variables" for ::1 at 2019-04-09 13:17:09 -0700 +Started GET "/tasks" for ::1 at 2019-04-09 13:20:18 -0700 +Processing by TasksController#index as HTML +Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.0ms) + + + +NoMethodError - undefined method `-' for nil:NilClass: + app/controllers/tasks_controller.rb:11:in `index' + +Started POST "/__better_errors/26ec796e2e573fb9/variables" for ::1 at 2019-04-09 13:20:19 -0700 +Started GET "/tasks" for ::1 at 2019-04-09 13:29:05 -0700 +Processing by TasksController#index as HTML +Completed 500 Internal Server Error in 4ms (ActiveRecord: 0.0ms) + + + +NoMethodError - undefined method `-' for nil:NilClass: + app/controllers/tasks_controller.rb:11:in `index' + +Started POST "/__better_errors/ad33c9659735063a/variables" for ::1 at 2019-04-09 13:29:05 -0700 +Started GET "/tasks" for ::1 at 2019-04-09 13:31:31 -0700 +Processing by TasksController#index as HTML +Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.0ms) + + + +NoMethodError - undefined method `-' for nil:NilClass: + app/controllers/tasks_controller.rb:11:in `index' + +Started POST "/__better_errors/d40cd7a3a8d8d2e7/variables" for ::1 at 2019-04-09 13:31:31 -0700 +Started GET "/tasks" for ::1 at 2019-04-09 13:32:26 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (0.6ms) +Completed 200 OK in 40ms (Views: 39.2ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for ::1 at 2019-04-09 13:33:11 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (0.7ms) +Completed 200 OK in 19ms (Views: 17.9ms | ActiveRecord: 0.0ms) + + +Started GET "/" for ::1 at 2019-04-09 16:14:16 -0700 +Processing by Rails::WelcomeController#index as HTML + Rendering /Users/bitaamani/.rvm/gems/ruby-2.6.0/gems/railties-5.2.3/lib/rails/templates/rails/welcome/index.html.erb + Rendered /Users/bitaamani/.rvm/gems/ruby-2.6.0/gems/railties-5.2.3/lib/rails/templates/rails/welcome/index.html.erb (3.4ms) +Completed 200 OK in 15ms (Views: 8.8ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for ::1 at 2019-04-09 16:14:25 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (0.6ms) +Completed 200 OK in 341ms (Views: 338.5ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for ::1 at 2019-04-09 16:16:21 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (0.7ms) +Completed 200 OK in 19ms (Views: 17.1ms | ActiveRecord: 0.0ms) + + +  (50.8ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY) + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:273 +  (7.9ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:273 +  (0.7ms) SELECT pg_try_advisory_lock(4169262226251541860) + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:273 +  (1.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:273 +Migrating to CreateTasks (20190409232440) +  (0.2ms) BEGIN + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:273 +  (0.2ms) ROLLBACK + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:273 +  (0.2ms) SELECT pg_advisory_unlock(4169262226251541860) + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:273 +  (0.2ms) SELECT pg_try_advisory_lock(4169262226251541860) + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:273 +  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:273 +Migrating to CreateTasks (20190409232440) +  (0.1ms) BEGIN + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:273 +  (13.0ms) CREATE TABLE "tasks" ("id" bigserial primary key, "name" character varying, "description" character varying, "completion_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) + ↳ db/migrate/20190409232440_create_tasks.rb:3 + ActiveRecord::SchemaMigration Create (0.5ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20190409232440"]] + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:273 +  (0.6ms) COMMIT + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:273 + ActiveRecord::InternalMetadata Load (0.4ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]] + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:273 +  (0.2ms) BEGIN + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:273 + ActiveRecord::InternalMetadata Create (0.6ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "development"], ["created_at", "2019-04-09 23:42:34.297238"], ["updated_at", "2019-04-09 23:42:34.297238"]] + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:273 +  (0.5ms) COMMIT + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:273 +  (0.3ms) SELECT pg_advisory_unlock(4169262226251541860) + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:273 +  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:273 diff --git a/test/fixtures/tasks.yml b/test/fixtures/tasks.yml new file mode 100644 index 000000000..a85ac588f --- /dev/null +++ b/test/fixtures/tasks.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + name: MyString + description: MyString + completion_date: + +two: + name: MyString + description: MyString + completion_date: diff --git a/test/models/task_test.rb b/test/models/task_test.rb new file mode 100644 index 000000000..7928a374f --- /dev/null +++ b/test/models/task_test.rb @@ -0,0 +1,9 @@ +require "test_helper" + +describe Task do + let(:task) { Task.new } + + it "must be valid" do + value(task).must_be :valid? + end +end From 809bcfb184c901cf922d1b1780acb7351f3c4397 Mon Sep 17 00:00:00 2001 From: Bitaman Date: Tue, 9 Apr 2019 17:06:37 -0700 Subject: [PATCH 05/16] added 3 tasks and fixed the controller and the view files --- app/controllers/tasks_controller.rb | 4 +- app/views/tasks/show.html.erb | 4 +- log/development.log | 83 +++++++++++++++++++++++++++++ 3 files changed, 87 insertions(+), 4 deletions(-) diff --git a/app/controllers/tasks_controller.rb b/app/controllers/tasks_controller.rb index adbdcebfb..0463c5313 100644 --- a/app/controllers/tasks_controller.rb +++ b/app/controllers/tasks_controller.rb @@ -4,7 +4,7 @@ class TasksController < ApplicationController def index - @tasks = TASKS + @tasks = Task.all end @@ -12,7 +12,7 @@ def show task_id = params[:id] puts "Task ID was #{task_id}" puts "result of .to_i: #{task_id.to_i}" - @task = TASKS[task_id.to_i] + @task = Task.find_by(id: task_id) unless @task head :not_found diff --git a/app/views/tasks/show.html.erb b/app/views/tasks/show.html.erb index 048cc0d1d..43d312eaa 100644 --- a/app/views/tasks/show.html.erb +++ b/app/views/tasks/show.html.erb @@ -1,8 +1,8 @@

Task details page

-Day: <%= @task[:day] %> +Task: <%= @task.name %>

-Task: <%= @task[:task] %> +Description: <%= @task.description %>

\ No newline at end of file diff --git a/log/development.log b/log/development.log index d3d786192..d6a0f76e0 100644 --- a/log/development.log +++ b/log/development.log @@ -196,3 +196,86 @@ Migrating to CreateTasks (20190409232440) ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:273  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:273 + Task Load (0.7ms) SELECT "tasks".* FROM "tasks" +  (0.2ms) BEGIN + Task Create (1.1ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Study"], ["description", "Read the lectures"], ["created_at", "2019-04-09 23:53:09.001177"], ["updated_at", "2019-04-09 23:53:09.001177"]] +  (0.6ms) COMMIT +  (0.3ms) BEGIN + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Homework"], ["description", "Finish the homeworks"], ["created_at", "2019-04-09 23:54:26.372518"], ["updated_at", "2019-04-09 23:54:26.372518"]] +  (0.9ms) COMMIT +  (0.2ms) BEGIN + Task Create (0.5ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "housework"], ["description", "Do your chores"], ["created_at", "2019-04-09 23:57:05.770772"], ["updated_at", "2019-04-09 23:57:05.770772"]] +  (0.9ms) COMMIT + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" +Started GET "/tasks" for ::1 at 2019-04-09 16:58:24 -0700 +  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC + ↳ /Users/bitaamani/.rvm/gems/ruby-2.6.0/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:98 +Processing by TasksController#index as HTML +Completed 500 Internal Server Error in 3ms (ActiveRecord: 0.0ms) + + + +NameError - uninitialized constant TasksController::TASKS: + app/controllers/tasks_controller.rb:7:in `index' + +Started POST "/__better_errors/ffae6d7b68e98b97/variables" for ::1 at 2019-04-09 16:58:24 -0700 +Started GET "/tasks" for ::1 at 2019-04-09 16:58:55 -0700 +Processing by TasksController#index as HTML +Completed 500 Internal Server Error in 223ms (ActiveRecord: 0.0ms) + + + +NameError - undefined local variable or method `task' for #: + app/controllers/tasks_controller.rb:7:in `index' + +Started POST "/__better_errors/e43f6ada20c6f1e0/variables" for ::1 at 2019-04-09 16:58:55 -0700 +Started GET "/tasks" for ::1 at 2019-04-09 17:02:16 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.6ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:3 + Rendered tasks/index.html.erb within layouts/application (11.2ms) +Completed 200 OK in 28ms (Views: 20.7ms | ActiveRecord: 4.8ms) + + +Started GET "/tasks/1" for ::1 at 2019-04-09 17:03:26 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"1"} +Completed 500 Internal Server Error in 6ms (ActiveRecord: 0.0ms) + + + +NameError - uninitialized constant TasksController::Book: + app/controllers/tasks_controller.rb:15:in `show' + +Started POST "/__better_errors/0bb17089bfef75b1/variables" for ::1 at 2019-04-09 17:03:26 -0700 +Started GET "/tasks/1" for ::1 at 2019-04-09 17:03:50 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"1"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:15 + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.4ms) +Completed 200 OK in 27ms (Views: 12.8ms | ActiveRecord: 4.3ms) + + +Started GET "/tasks/1" for ::1 at 2019-04-09 17:04:45 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"1"} + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:15 + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.6ms) +Completed 200 OK in 20ms (Views: 16.7ms | ActiveRecord: 0.5ms) + + +Started GET "/tasks/1" for ::1 at 2019-04-09 17:05:20 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"1"} + Task Load (0.6ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:15 + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.6ms) +Completed 200 OK in 33ms (Views: 29.3ms | ActiveRecord: 0.6ms) + + From c9cdefa5b07ee1920bb9a8941335994e8965cd85 Mon Sep 17 00:00:00 2001 From: Bitaman Date: Wed, 10 Apr 2019 16:09:19 -0700 Subject: [PATCH 06/16] added the routes, made a show.html and a new.html --- app/views/tasks/index.html.erb | 3 + app/views/tasks/new.html.rb | 23 ++++ app/views/tasks/show.html.erb | 2 + config/routes.rb | 11 +- log/development.log | 36 +++++ log/test.log | 160 ++++++++++++++++++++++ test/controllers/tasks_controller_test.rb | 10 +- 7 files changed, 239 insertions(+), 6 deletions(-) create mode 100644 app/views/tasks/new.html.rb create mode 100644 log/test.log diff --git a/app/views/tasks/index.html.erb b/app/views/tasks/index.html.erb index 2ff7086e7..3201e0b21 100644 --- a/app/views/tasks/index.html.erb +++ b/app/views/tasks/index.html.erb @@ -1,3 +1,6 @@ +

Hello, this is my task list

There are <%= @tasks.length %> tasks to do.

diff --git a/app/views/tasks/new.html.rb b/app/views/tasks/new.html.rb new file mode 100644 index 000000000..02300e0e0 --- /dev/null +++ b/app/views/tasks/new.html.rb @@ -0,0 +1,23 @@ +

New Task Form

+ +<%= form_with model: @task, class: 'task-form' do |f| %> +

Please fill out this Task data

+ + #
+ # <%= f.label :name, "Please enter a task name" %> + # <%= f.text_field :name, placeholder: "a task" %> + #
+ +
+ <%= f.label :description %> + <%= f.text_field :description, placeholder: "task description" %> +
+ +
+ <%= f.label :completion_date %> + <%= f.text_field :completion_date, placeholder: "task completion date" %> +
+ + <%= f.submit "Save it!" %> + +<% end %> \ No newline at end of file diff --git a/app/views/tasks/show.html.erb b/app/views/tasks/show.html.erb index 43d312eaa..6d3958661 100644 --- a/app/views/tasks/show.html.erb +++ b/app/views/tasks/show.html.erb @@ -1,3 +1,5 @@ + +

Task details page

diff --git a/config/routes.rb b/config/routes.rb index f401386cd..3c59467ce 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,5 +1,12 @@ Rails.application.routes.draw do # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html - get "/tasks" , to: "tasks#index" - get "/tasks/:id" , to: "tasks#show" + get '/tasks', to: 'tasks#index', as: 'tasks' + get '/tasks/new', to: 'tasks#new', as: 'new_task' + post '/tasks', to: 'tasks#create' + + # Routes that operate on individual tasks + get '/tasks/:id', to: 'tasks#show', as: 'task' + get '/tasks/:id/edit', to: 'tasks#edit', as: 'edit_task' + patch '/tasks/:id', to: 'tasks#update' + delete '/tasks/:id', to: 'tasks#destroy' end diff --git a/log/development.log b/log/development.log index d6a0f76e0..b3faa1477 100644 --- a/log/development.log +++ b/log/development.log @@ -279,3 +279,39 @@ Processing by TasksController#show as HTML Completed 200 OK in 33ms (Views: 29.3ms | ActiveRecord: 0.6ms) +Started GET "/" for ::1 at 2019-04-10 15:58:49 -0700 +  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC + ↳ /Users/bitaamani/.rvm/gems/ruby-2.6.0/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:98 +Processing by Rails::WelcomeController#index as HTML + Rendering /Users/bitaamani/.rvm/gems/ruby-2.6.0/gems/railties-5.2.3/lib/rails/templates/rails/welcome/index.html.erb + Rendered /Users/bitaamani/.rvm/gems/ruby-2.6.0/gems/railties-5.2.3/lib/rails/templates/rails/welcome/index.html.erb (3.4ms) +Completed 200 OK in 16ms (Views: 8.3ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for ::1 at 2019-04-10 15:58:59 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (3.7ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:6 + Rendered tasks/index.html.erb within layouts/application (19.2ms) +Completed 200 OK in 340ms (Views: 324.2ms | ActiveRecord: 9.5ms) + + +Started GET "/tasks" for ::1 at 2019-04-10 15:59:03 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.6ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:6 + Rendered tasks/index.html.erb within layouts/application (2.5ms) +Completed 200 OK in 24ms (Views: 21.3ms | ActiveRecord: 0.6ms) + + +Started GET "/tasks" for ::1 at 2019-04-10 15:59:05 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (2.0ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:6 + Rendered tasks/index.html.erb within layouts/application (4.2ms) +Completed 200 OK in 27ms (Views: 23.4ms | ActiveRecord: 2.0ms) + + diff --git a/log/test.log b/log/test.log new file mode 100644 index 000000000..198eea996 --- /dev/null +++ b/log/test.log @@ -0,0 +1,160 @@ +  (211.9ms) DROP DATABASE IF EXISTS "TaskList_test" +  (501.7ms) CREATE DATABASE "TaskList_test" ENCODING = 'unicode' + SQL (1.6ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (2.3ms) DROP TABLE IF EXISTS "tasks" CASCADE +  (8.1ms) CREATE TABLE "tasks" ("id" bigserial primary key, "name" character varying, "description" character varying, "completion_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) +  (3.4ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY) +  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (1.1ms) INSERT INTO "schema_migrations" (version) VALUES (20190409232440) +  (4.1ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) + ActiveRecord::InternalMetadata Load (0.4ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]] +  (0.2ms) BEGIN + ActiveRecord::InternalMetadata Create (0.6ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "test"], ["created_at", "2019-04-10 23:03:24.518872"], ["updated_at", "2019-04-10 23:03:24.518872"]] +  (0.4ms) COMMIT + ActiveRecord::InternalMetadata Load (0.7ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]] +  (0.2ms) BEGIN +  (0.1ms) COMMIT +  (0.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) BEGIN +  (2.9ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (2.8ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-10 23:03:25.016656', '2019-04-10 23:03:25.016656'), (298486374, 'MyString', 'MyString', NULL, '2019-04-10 23:03:25.016656', '2019-04-10 23:03:25.016656') +  (0.7ms) COMMIT +  (0.3ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.3ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.4ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.4ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (4.3ms) ROLLBACK +  (0.5ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-10 16:03:25 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (39.2ms) +Completed 200 OK in 289ms (Views: 280.6ms | ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.2ms) ROLLBACK +  (0.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.3ms) BEGIN +  (0.4ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.2ms) BEGIN + Fixtures Load (0.6ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-10 23:04:48.884598', '2019-04-10 23:04:48.884598'), (298486374, 'MyString', 'MyString', NULL, '2019-04-10 23:04:48.884598', '2019-04-10 23:04:48.884598') +  (0.5ms) COMMIT +  (0.1ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-10 16:04:48 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (11.9ms) +Completed 200 OK in 193ms (Views: 184.6ms | ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.2ms) ROLLBACK diff --git a/test/controllers/tasks_controller_test.rb b/test/controllers/tasks_controller_test.rb index 971913898..5e539556e 100644 --- a/test/controllers/tasks_controller_test.rb +++ b/test/controllers/tasks_controller_test.rb @@ -1,9 +1,11 @@ require "test_helper" describe TasksController do + # Note to students: Your Task model **may** be different and + # you may need to modify this. let (:task) { Task.create name: "sample task", description: "this is an example for a test", - completion_date: Time.now + 5.days + completed: false } # Tests for Wave 1 @@ -43,7 +45,6 @@ # Assert must_respond_with :redirect - expect(flash[:error]).must_equal "Could not find task with id: -1" end end @@ -64,11 +65,13 @@ skip # Arrange + # Note to students: Your Task model **may** be different and + # you may need to modify this. task_hash = { task: { name: "new task", description: "new task description", - completion_date: nil, + completed: false, }, } @@ -79,7 +82,6 @@ new_task = Task.find_by(name: task_hash[:task][:name]) expect(new_task.description).must_equal task_hash[:task][:description] - expect(new_task.due_date.to_time.to_i).must_equal task_hash[:task][:due_date].to_i expect(new_task.completed).must_equal task_hash[:task][:completed] must_respond_with :redirect From 43506526304eee5ec86bf366d97a2a6fa1f8f85f Mon Sep 17 00:00:00 2001 From: Bitaman Date: Thu, 11 Apr 2019 13:37:51 -0700 Subject: [PATCH 07/16] fixed the application and added the add new link --- app/controllers/tasks_controller.rb | 28 +- app/views/layouts/application.html.erb | 22 +- app/views/tasks/index.html.erb | 6 +- app/views/tasks/{new.html.rb => new.html.erb} | 10 +- config/routes.rb | 1 + log/development.log | 259 ++++++ log/test.log | 878 ++++++++++++++++++ test/controllers/tasks_controller_test.rb | 2 +- 8 files changed, 1192 insertions(+), 14 deletions(-) rename app/views/tasks/{new.html.rb => new.html.erb} (74%) diff --git a/app/controllers/tasks_controller.rb b/app/controllers/tasks_controller.rb index 0463c5313..6f608995b 100644 --- a/app/controllers/tasks_controller.rb +++ b/app/controllers/tasks_controller.rb @@ -8,15 +8,37 @@ def index end -def show + def show task_id = params[:id] puts "Task ID was #{task_id}" puts "result of .to_i: #{task_id.to_i}" @task = Task.find_by(id: task_id) unless @task - head :not_found + #head :not_found + redirect_to tasks_path end -end + end + def new + @task = Task.new + end + def create + @task = Task.new + unless params["task"] + render :new, status: :bad_request + return + end + + @task.name = params["task"]["name"] + @task.description = params["task"]["description"] + @task.save + redirect_to tasks_path + end + def edit + + end + + + end diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index b9ce64348..60bc63a16 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -10,6 +10,26 @@ - <%= yield %> +

+

Bita's Task list

+ +
+ +
+ <%= yield %> +
+ +
+ © Bita Amani Shahrak 2019 +
diff --git a/app/views/tasks/index.html.erb b/app/views/tasks/index.html.erb index 3201e0b21..1284458da 100644 --- a/app/views/tasks/index.html.erb +++ b/app/views/tasks/index.html.erb @@ -1,6 +1,4 @@ - +

Hello, this is my task list

There are <%= @tasks.length %> tasks to do.

@@ -9,7 +7,7 @@
    <% @tasks.each do |task|%>
  • -<%= task.name %> : <%= task.description %> +<%= task.name %> : <%= task.description %> , <%= task.Completion_date%>
  • <% end %>
\ No newline at end of file diff --git a/app/views/tasks/new.html.rb b/app/views/tasks/new.html.erb similarity index 74% rename from app/views/tasks/new.html.rb rename to app/views/tasks/new.html.erb index 02300e0e0..0b8b8fd42 100644 --- a/app/views/tasks/new.html.rb +++ b/app/views/tasks/new.html.erb @@ -3,10 +3,10 @@ <%= form_with model: @task, class: 'task-form' do |f| %>

Please fill out this Task data

- #
- # <%= f.label :name, "Please enter a task name" %> - # <%= f.text_field :name, placeholder: "a task" %> - #
+
+ <%= f.label :name, "Please enter a task name" %> + <%= f.text_field :name, placeholder: "a task" %> +
<%= f.label :description %> @@ -20,4 +20,4 @@ <%= f.submit "Save it!" %> -<% end %> \ No newline at end of file +<% end %> \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index 3c59467ce..2ae6ea827 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,5 +1,6 @@ Rails.application.routes.draw do # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html + root 'tasks#index' get '/tasks', to: 'tasks#index', as: 'tasks' get '/tasks/new', to: 'tasks#new', as: 'new_task' post '/tasks', to: 'tasks#create' diff --git a/log/development.log b/log/development.log index b3faa1477..7c7b6665c 100644 --- a/log/development.log +++ b/log/development.log @@ -315,3 +315,262 @@ Processing by TasksController#index as HTML Completed 200 OK in 27ms (Views: 23.4ms | ActiveRecord: 2.0ms) +Started GET "/" for ::1 at 2019-04-10 16:25:38 -0700 +  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC + ↳ /Users/bitaamani/.rvm/gems/ruby-2.6.0/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:98 +Processing by Rails::WelcomeController#index as HTML + Rendering /Users/bitaamani/.rvm/gems/ruby-2.6.0/gems/railties-5.2.3/lib/rails/templates/rails/welcome/index.html.erb + Rendered /Users/bitaamani/.rvm/gems/ruby-2.6.0/gems/railties-5.2.3/lib/rails/templates/rails/welcome/index.html.erb (3.5ms) +Completed 200 OK in 23ms (Views: 9.8ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for ::1 at 2019-04-10 16:25:45 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (10.1ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:6 + Rendered tasks/index.html.erb within layouts/application (35.6ms) +Completed 200 OK in 375ms (Views: 344.1ms | ActiveRecord: 21.7ms) + + +Started GET "/tasks/new" for ::1 at 2019-04-10 16:25:49 -0700 +Processing by TasksController#new as HTML +Completed 406 Not Acceptable in 52ms (ActiveRecord: 0.0ms) + + + +ActionController::UnknownFormat - TasksController#new is missing a template for this request format and variant. + +request.formats: ["text/html"] +request.variant: [] + +NOTE! For XHR/Ajax or API requests, this action would normally respond with 204 No Content: an empty white screen. Since you're loading it in a web browser, we assume that you expected to actually render a template, not nothing, so we're showing an error to be extra-clear. If you expect 204 No Content, carry on. That's what you'll get from an XHR or API request. Give it a shot.: + +Started POST "/__better_errors/b6bebe05336d98de/variables" for ::1 at 2019-04-10 16:25:49 -0700 + Task Load (0.6ms) SELECT "tasks".* FROM "tasks" +Started GET "/tasks/new" for ::1 at 2019-04-10 16:33:28 -0700 +Processing by TasksController#new as HTML +Completed 406 Not Acceptable in 34ms (ActiveRecord: 0.0ms) + + + +ActionController::UnknownFormat - TasksController#new is missing a template for this request format and variant. + +request.formats: ["text/html"] +request.variant: [] + +NOTE! For XHR/Ajax or API requests, this action would normally respond with 204 No Content: an empty white screen. Since you're loading it in a web browser, we assume that you expected to actually render a template, not nothing, so we're showing an error to be extra-clear. If you expect 204 No Content, carry on. That's what you'll get from an XHR or API request. Give it a shot.: + +Started POST "/__better_errors/f1afd3e80c009a4e/variables" for ::1 at 2019-04-10 16:33:28 -0700 +Started GET "/tasks/new/" for ::1 at 2019-04-10 16:34:41 -0700 +Processing by TasksController#new as HTML +Completed 406 Not Acceptable in 41ms (ActiveRecord: 0.0ms) + + + +ActionController::UnknownFormat - TasksController#new is missing a template for this request format and variant. + +request.formats: ["text/html"] +request.variant: [] + +NOTE! For XHR/Ajax or API requests, this action would normally respond with 204 No Content: an empty white screen. Since you're loading it in a web browser, we assume that you expected to actually render a template, not nothing, so we're showing an error to be extra-clear. If you expect 204 No Content, carry on. That's what you'll get from an XHR or API request. Give it a shot.: + +Started POST "/__better_errors/ef349a4b5964706d/variables" for ::1 at 2019-04-10 16:34:41 -0700 +Started GET "/tasks/new" for ::1 at 2019-04-10 16:34:43 -0700 +Processing by TasksController#new as HTML +Completed 406 Not Acceptable in 36ms (ActiveRecord: 0.0ms) + + + +ActionController::UnknownFormat - TasksController#new is missing a template for this request format and variant. + +request.formats: ["text/html"] +request.variant: [] + +NOTE! For XHR/Ajax or API requests, this action would normally respond with 204 No Content: an empty white screen. Since you're loading it in a web browser, we assume that you expected to actually render a template, not nothing, so we're showing an error to be extra-clear. If you expect 204 No Content, carry on. That's what you'll get from an XHR or API request. Give it a shot.: + +Started POST "/__better_errors/897d69979adccb86/variables" for ::1 at 2019-04-10 16:34:43 -0700 +Started GET "/tasks/new" for ::1 at 2019-04-10 16:36:07 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (50.2ms) +Completed 200 OK in 78ms (Views: 76.2ms | ActiveRecord: 0.0ms) + + +Started POST "/tasks" for ::1 at 2019-04-10 16:37:12 -0700 +Processing by TasksController#create as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"CF7VaaK1dW9DMJ9MouKvcJgeJpXn7tVa1QltxdwQCMl1+PQ/v1CVxcjL3J7xLxTQxOZGM1ZrVyzMdmWYgx3yyQ==", "task"=>{"name"=>"", "description"=>"", "completion_date"=>""}, "commit"=>"Save it!"} +  (1.9ms) BEGIN + ↳ app/controllers/tasks_controller.rb:33 + Task Create (4.8ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", ""], ["description", ""], ["created_at", "2019-04-10 23:37:12.921025"], ["updated_at", "2019-04-10 23:37:12.921025"]] + ↳ app/controllers/tasks_controller.rb:33 +  (1.3ms) COMMIT + ↳ app/controllers/tasks_controller.rb:33 +Completed 500 Internal Server Error in 16ms (ActiveRecord: 8.0ms) + + + +NameError - uninitialized constant TasksController::Tasks_path: + app/controllers/tasks_controller.rb:34:in `create' + +Started POST "/__better_errors/bb056fa40959d2e0/variables" for ::1 at 2019-04-10 16:37:13 -0700 +Started GET "/tasks" for ::1 at 2019-04-10 16:38:01 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:6 + Rendered tasks/index.html.erb within layouts/application (13.6ms) +Completed 200 OK in 40ms (Views: 28.3ms | ActiveRecord: 7.1ms) + + +Started GET "/tasks/new" for ::1 at 2019-04-10 16:38:44 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (3.9ms) +Completed 200 OK in 34ms (Views: 30.8ms | ActiveRecord: 0.0ms) + + +Started POST "/tasks" for ::1 at 2019-04-10 16:39:47 -0700 +Processing by TasksController#create as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"0fzvIiHRHnRTKoPTuVqZqKtVW5dxJxUD3J75+s5Ace/7Np+GCNsuqxGVxIBZ5fadiNbbbHXzLjM5f/BAyd/fBA==", "task"=>{"name"=>"Cookin", "description"=>"Prepare dinner", "completion_date"=>"2018-02-03"}, "commit"=>"Save it!"} +  (0.2ms) BEGIN + ↳ app/controllers/tasks_controller.rb:33 + Task Create (2.8ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Cookin"], ["description", "Prepare dinner"], ["created_at", "2019-04-10 23:39:47.623792"], ["updated_at", "2019-04-10 23:39:47.623792"]] + ↳ app/controllers/tasks_controller.rb:33 +  (0.8ms) COMMIT + ↳ app/controllers/tasks_controller.rb:33 +Redirected to http://localhost:3000/tasks +Completed 302 Found in 8ms (ActiveRecord: 3.8ms) + + +Started GET "/tasks" for ::1 at 2019-04-10 16:39:47 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:6 + Rendered tasks/index.html.erb within layouts/application (2.3ms) +Completed 200 OK in 21ms (Views: 19.1ms | ActiveRecord: 0.4ms) + + +Started GET "/tasks/new" for ::1 at 2019-04-10 16:39:58 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (2.9ms) +Completed 200 OK in 37ms (Views: 34.1ms | ActiveRecord: 0.0ms) + + +Started POST "/tasks" for ::1 at 2019-04-10 16:40:23 -0700 +Processing by TasksController#create as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"kMvldgWq2qv331lY2J9Y5TbfHp9QKS/gR/Y3/8feCZa6AZXSLKDqdLVgHgs4IDfQFVyeZFT9FNCiFz5FwEGnfQ==", "task"=>{"name"=>"playing", "description"=>"play some bord game", "completion_date"=>"2018-02-05"}, "commit"=>"Save it!"} +  (1.0ms) BEGIN + ↳ app/controllers/tasks_controller.rb:33 + Task Create (1.2ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "playing"], ["description", "play some bord game"], ["created_at", "2019-04-10 23:40:23.981277"], ["updated_at", "2019-04-10 23:40:23.981277"]] + ↳ app/controllers/tasks_controller.rb:33 +  (0.9ms) COMMIT + ↳ app/controllers/tasks_controller.rb:33 +Redirected to http://localhost:3000/tasks +Completed 302 Found in 7ms (ActiveRecord: 3.1ms) + + +Started GET "/tasks" for ::1 at 2019-04-10 16:40:23 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:6 + Rendered tasks/index.html.erb within layouts/application (2.9ms) +Completed 200 OK in 21ms (Views: 19.2ms | ActiveRecord: 0.4ms) + + +Started GET "/tasks/new" for ::1 at 2019-04-10 16:49:40 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (2.1ms) +Completed 200 OK in 37ms (Views: 22.0ms | ActiveRecord: 7.2ms) + + +Started POST "/tasks" for ::1 at 2019-04-10 16:49:42 -0700 +Processing by TasksController#create as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"ShKy/w2ki7gDIat+RWkfrjqHwMFBYbxrxf4HiIJscrtg2MJbJK67Z0Ge7C2l1nCbGQRAOkW1h1sgHw4yhfPcUA==", "task"=>{"name"=>"", "description"=>"", "completion_date"=>""}, "commit"=>"Save it!"} +  (2.3ms) BEGIN + ↳ app/controllers/tasks_controller.rb:33 + Task Create (2.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", ""], ["description", ""], ["created_at", "2019-04-10 23:49:42.548723"], ["updated_at", "2019-04-10 23:49:42.548723"]] + ↳ app/controllers/tasks_controller.rb:33 +  (1.0ms) COMMIT + ↳ app/controllers/tasks_controller.rb:33 +Redirected to http://localhost:3000/tasks +Completed 302 Found in 10ms (ActiveRecord: 5.5ms) + + +Started GET "/tasks" for ::1 at 2019-04-10 16:49:42 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:6 + Rendered tasks/index.html.erb within layouts/application (2.3ms) +Completed 200 OK in 22ms (Views: 19.5ms | ActiveRecord: 0.5ms) + + +Started GET "/" for ::1 at 2019-04-11 13:21:12 -0700 +  (1.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC + ↳ /Users/bitaamani/.rvm/gems/ruby-2.6.0/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:98 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.6ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:6 + Rendered tasks/index.html.erb within layouts/application (13.8ms) +Completed 200 OK in 307ms (Views: 277.6ms | ActiveRecord: 6.5ms) + + +Started GET "/tasks/new" for ::1 at 2019-04-11 13:21:20 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (16.2ms) +Completed 200 OK in 45ms (Views: 43.1ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks/new" for ::1 at 2019-04-11 13:21:26 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (3.5ms) +Completed 200 OK in 42ms (Views: 39.2ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks/new" for ::1 at 2019-04-11 13:27:35 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (3.4ms) +Completed 200 OK in 28ms (Views: 25.4ms | ActiveRecord: 0.0ms) + + +Started POST "/tasks" for ::1 at 2019-04-11 13:28:01 -0700 +Processing by TasksController#create as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"dBXvZ6mH7e0nNryT55C0X3TVgZlA0V9lz9J/6OTJa/Re35/DgI3dMmWJ+8AHL9tqV1YBYkQFZFUqM3ZS41bFHw==", "task"=>{"name"=>"Washing", "description"=>"turn on the dishwasher", "completion_date"=>"2018-02-05"}, "commit"=>"Save it!"} +  (1.2ms) BEGIN + ↳ app/controllers/tasks_controller.rb:34 + Task Create (8.8ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Washing"], ["description", "turn on the dishwasher"], ["created_at", "2019-04-11 20:28:01.079211"], ["updated_at", "2019-04-11 20:28:01.079211"]] + ↳ app/controllers/tasks_controller.rb:34 +  (0.6ms) COMMIT + ↳ app/controllers/tasks_controller.rb:34 +Redirected to http://localhost:3000/tasks +Completed 302 Found in 15ms (ActiveRecord: 10.6ms) + + +Started GET "/tasks" for ::1 at 2019-04-11 13:28:01 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.6ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:6 + Rendered tasks/index.html.erb within layouts/application (2.2ms) +Completed 200 OK in 24ms (Views: 21.9ms | ActiveRecord: 0.6ms) + + +Started GET "/tasks/1" for ::1 at 2019-04-11 13:28:45 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"1"} + Task Load (0.7ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:15 + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.8ms) +Completed 200 OK in 51ms (Views: 32.0ms | ActiveRecord: 1.9ms) + + diff --git a/log/test.log b/log/test.log index 198eea996..0bf2cb63f 100644 --- a/log/test.log +++ b/log/test.log @@ -158,3 +158,881 @@ TasksController::update: test_0002_will redirect to the root page if given an in Task: test_0001_must be valid -----------------------------  (0.2ms) ROLLBACK +  (0.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.1ms) BEGIN +  (0.4ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.6ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-10 23:42:06.812513', '2019-04-10 23:42:06.812513'), (298486374, 'MyString', 'MyString', NULL, '2019-04-10 23:42:06.812513', '2019-04-10 23:42:06.812513') +  (0.5ms) COMMIT +  (0.1ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-10 16:42:06 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (13.1ms) +Completed 200 OK in 176ms (Views: 168.7ms | ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +  (0.1ms) ROLLBACK +  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.1ms) BEGIN +  (0.4ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.5ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-10 23:44:12.953909', '2019-04-10 23:44:12.953909'), (298486374, 'MyString', 'MyString', NULL, '2019-04-10 23:44:12.953909', '2019-04-10 23:44:12.953909') +  (1.0ms) COMMIT +  (0.2ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-10 16:44:12 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (6.8ms) +Completed 200 OK in 206ms (Views: 200.6ms | ActiveRecord: 0.3ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-10 16:44:13 -0700 +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.1ms) ROLLBACK +  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) BEGIN +  (0.4ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.5ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-10 23:44:29.598606', '2019-04-10 23:44:29.598606'), (298486374, 'MyString', 'MyString', NULL, '2019-04-10 23:44:29.598606', '2019-04-10 23:44:29.598606') +  (1.3ms) COMMIT +  (0.3ms) BEGIN +  (0.3ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.2ms) COMMIT +  (0.2ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-10 16:44:29 -0700 +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-10 16:44:29 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.5ms) +Completed 200 OK in 211ms (Views: 205.3ms | ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) BEGIN +  (0.4ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.5ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-10 23:45:02.780324', '2019-04-10 23:45:02.780324'), (298486374, 'MyString', 'MyString', NULL, '2019-04-10 23:45:02.780324', '2019-04-10 23:45:02.780324') +  (0.9ms) COMMIT +  (0.1ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-10 16:45:02 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (7.5ms) +Completed 200 OK in 209ms (Views: 203.5ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-10 16:45:03 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.2ms) +Completed 200 OK in 4ms (Views: 2.5ms | ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +  (0.1ms) ROLLBACK +  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) BEGIN +  (0.4ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.5ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-10 23:45:22.932376', '2019-04-10 23:45:22.932376'), (298486374, 'MyString', 'MyString', NULL, '2019-04-10 23:45:22.932376', '2019-04-10 23:45:22.932376') +  (1.3ms) COMMIT +  (0.3ms) BEGIN +  (0.3ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.2ms) COMMIT +  (0.2ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-10 16:45:22 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (7.6ms) +Completed 200 OK in 205ms (Views: 199.3ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-10 16:45:23 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.2ms) +Completed 200 OK in 3ms (Views: 2.3ms | ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-10 16:45:23 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Completed 404 Not Found in 4ms (ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.1ms) ROLLBACK +  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) BEGIN +  (0.3ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.2ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.6ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-10 23:46:32.352994', '2019-04-10 23:46:32.352994'), (298486374, 'MyString', 'MyString', NULL, '2019-04-10 23:46:32.352994', '2019-04-10 23:46:32.352994') +  (1.2ms) COMMIT +  (0.2ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-10 16:46:32 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Completed 404 Not Found in 10ms (ActiveRecord: 0.5ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.2ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-10 16:46:32 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.4ms) +Completed 200 OK in 154ms (Views: 151.5ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-10 16:46:32 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.1ms) +Completed 200 OK in 3ms (Views: 2.2ms | ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +  (0.2ms) ROLLBACK +  (0.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) BEGIN +  (0.4ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.6ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-10 23:47:32.654152', '2019-04-10 23:47:32.654152'), (298486374, 'MyString', 'MyString', NULL, '2019-04-10 23:47:32.654152', '2019-04-10 23:47:32.654152') +  (1.0ms) COMMIT +  (0.1ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-10 16:47:32 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Completed 404 Not Found in 7ms (ActiveRecord: 0.4ms) +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-10 16:47:32 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.1ms) +Completed 200 OK in 202ms (Views: 200.3ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-10 16:47:32 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.2ms) +Completed 200 OK in 3ms (Views: 2.3ms | ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) BEGIN +  (0.3ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.6ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-10 23:47:50.281664', '2019-04-10 23:47:50.281664'), (298486374, 'MyString', 'MyString', NULL, '2019-04-10 23:47:50.281664', '2019-04-10 23:47:50.281664') +  (1.3ms) COMMIT +  (0.5ms) BEGIN +  (0.3ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-10 16:47:50 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (16.7ms) +Completed 200 OK in 203ms (Views: 195.3ms | ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-10 16:47:50 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.1ms) +Completed 200 OK in 3ms (Views: 2.4ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-10 16:47:50 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Completed 404 Not Found in 2ms (ActiveRecord: 0.4ms) +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.1ms) BEGIN +  (0.3ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.5ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-10 23:48:34.380522', '2019-04-10 23:48:34.380522'), (298486374, 'MyString', 'MyString', NULL, '2019-04-10 23:48:34.380522', '2019-04-10 23:48:34.380522') +  (1.2ms) COMMIT +  (0.2ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-10 16:48:34 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Completed 404 Not Found in 9ms (ActiveRecord: 0.5ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-10 16:48:34 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.3ms) +Completed 200 OK in 125ms (Views: 123.6ms | ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-10 16:48:34 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.1ms) +Completed 200 OK in 3ms (Views: 2.3ms | ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (2.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.1ms) BEGIN +  (4.2ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.4ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (1.7ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-11 20:16:00.884927', '2019-04-11 20:16:00.884927'), (298486374, 'MyString', 'MyString', NULL, '2019-04-11 20:16:00.884927', '2019-04-11 20:16:00.884927') +  (1.1ms) COMMIT +  (0.2ms) BEGIN +  (0.3ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-11 13:16:00 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Completed 404 Not Found in 12ms (ActiveRecord: 0.5ms) +  (0.4ms) ROLLBACK +  (0.2ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-11 13:16:00 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (16.2ms) +Completed 200 OK in 235ms (Views: 232.6ms | ActiveRecord: 0.3ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-11 13:16:01 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.3ms) +Completed 200 OK in 4ms (Views: 2.7ms | ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) BEGIN +  (0.4ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (1.8ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-11 20:19:03.074626', '2019-04-11 20:19:03.074626'), (298486374, 'MyString', 'MyString', NULL, '2019-04-11 20:19:03.074626', '2019-04-11 20:19:03.074626') +  (0.4ms) COMMIT +  (0.1ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.4ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.4ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-11 13:19:03 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.6ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (5.7ms) +Completed 200 OK in 175ms (Views: 164.3ms | ActiveRecord: 0.6ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-11 13:19:03 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.1ms) +Completed 200 OK in 3ms (Views: 2.3ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +  (0.2ms) ROLLBACK +  (0.6ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-11 13:19:03 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK diff --git a/test/controllers/tasks_controller_test.rb b/test/controllers/tasks_controller_test.rb index 5e539556e..51c3a23ac 100644 --- a/test/controllers/tasks_controller_test.rb +++ b/test/controllers/tasks_controller_test.rb @@ -39,7 +39,7 @@ end it "will redirect for an invalid task" do - skip + # Act get task_path(-1) From 9611bb5de684f59315b5e6b21ad2485d47f83151 Mon Sep 17 00:00:00 2001 From: Bitaman Date: Thu, 11 Apr 2019 15:26:31 -0700 Subject: [PATCH 08/16] fixed the edit page in view and all the methods in controller --- app/controllers/tasks_controller.rb | 9 +- app/views/layouts/application.html.erb | 4 +- app/views/tasks/edit.html.erb | 23 + app/views/tasks/index.html.erb | 3 +- app/views/tasks/show.html.erb | 3 + log/development.log | 976 ++++++++++++++++++ log/test.log | 1122 +++++++++++++++++++++ test/controllers/tasks_controller_test.rb | 15 +- 8 files changed, 2145 insertions(+), 10 deletions(-) create mode 100644 app/views/tasks/edit.html.erb diff --git a/app/controllers/tasks_controller.rb b/app/controllers/tasks_controller.rb index 6f608995b..3639647a4 100644 --- a/app/controllers/tasks_controller.rb +++ b/app/controllers/tasks_controller.rb @@ -21,6 +21,7 @@ def show end def new @task = Task.new + end def create @task = Task.new @@ -32,11 +33,17 @@ def create @task.name = params["task"]["name"] @task.description = params["task"]["description"] @task.save - redirect_to tasks_path + redirect_to task_path(@task.id) end def edit + @task = Task.find(params[:id]) end + def update + @task = Task.find(params[:id]) + @task.update(name: params["task"]["name"], description: params["task"]["description"], completion_date: params["task"]["completion_date"]) + redirect_to task_path + end diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 60bc63a16..4d1056038 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -15,10 +15,10 @@ diff --git a/app/views/tasks/edit.html.erb b/app/views/tasks/edit.html.erb new file mode 100644 index 000000000..8cf4de7f6 --- /dev/null +++ b/app/views/tasks/edit.html.erb @@ -0,0 +1,23 @@ +

Edit Task Form

+ +<%= form_with model: @task, class: 'task-form' do |f| %> +

Please fill out this Task data

+ +
+ <%= f.label :name, "Please enter a task name" %> + <%= f.text_field :name, placeholder: "a task" %> +
+ +
+ <%= f.label :description %> + <%= f.text_field :description, placeholder: "task description" %> +
+ +
+ <%= f.label :completion_date %> + <%= f.text_field :completion_date, placeholder: "task completion date" %> +
+ + <%= f.submit "Edit it!" %> + +<% end %> \ No newline at end of file diff --git a/app/views/tasks/index.html.erb b/app/views/tasks/index.html.erb index 1284458da..7359fa9ff 100644 --- a/app/views/tasks/index.html.erb +++ b/app/views/tasks/index.html.erb @@ -7,7 +7,8 @@
    <% @tasks.each do |task|%>
  • -<%= task.name %> : <%= task.description %> , <%= task.Completion_date%> +<%= task.name %> : <%= task.description %> , <%= task.completion_date%> + <%= link_to "Edit", edit_task_path(task.id) %>
  • <% end %>
\ No newline at end of file diff --git a/app/views/tasks/show.html.erb b/app/views/tasks/show.html.erb index 6d3958661..ec2de8bfc 100644 --- a/app/views/tasks/show.html.erb +++ b/app/views/tasks/show.html.erb @@ -7,4 +7,7 @@ Task: <%= @task.name %>

Description: <%= @task.description %> +

+

+Completion_date: <%= @task.completion_date %>

\ No newline at end of file diff --git a/log/development.log b/log/development.log index 7c7b6665c..eebf41e8d 100644 --- a/log/development.log +++ b/log/development.log @@ -574,3 +574,979 @@ Processing by TasksController#show as HTML Completed 200 OK in 51ms (Views: 32.0ms | ActiveRecord: 1.9ms) +Started GET "/tasks/1" for ::1 at 2019-04-11 13:38:08 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"1"} + Task Load (0.6ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:15 + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.9ms) +Completed 500 Internal Server Error in 346ms (ActiveRecord: 0.8ms) + + + +NameError - undefined local variable or method `books_path' for #<#:0x00007fbd6ea93f98>: + app/views/layouts/application.html.erb:18:in `_app_views_layouts_application_html_erb__2696284633794492919_70225791059740' + +Started POST "/__better_errors/7753b65566f035d9/variables" for ::1 at 2019-04-11 13:38:09 -0700 +Started GET "/tasks" for ::1 at 2019-04-11 13:38:12 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (19.4ms) +Completed 500 Internal Server Error in 26ms (ActiveRecord: 0.4ms) + + + +NoMethodError - undefined method `Completion_date' for # +Did you mean? completion_date= + completion_date? + completion_date_was: + app/views/tasks/index.html.erb:10:in `block in _app_views_tasks_index_html_erb___2701780339293181440_70225784664640' + app/views/tasks/index.html.erb:8:in `_app_views_tasks_index_html_erb___2701780339293181440_70225784664640' + +Started GET "/" for ::1 at 2019-04-11 13:38:14 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (20.6ms) +Completed 500 Internal Server Error in 25ms (ActiveRecord: 0.4ms) + + + +NoMethodError - undefined method `Completion_date' for # +Did you mean? completion_date= + completion_date? + completion_date_was: + app/views/tasks/index.html.erb:10:in `block in _app_views_tasks_index_html_erb___2701780339293181440_70225784355180' + app/views/tasks/index.html.erb:8:in `_app_views_tasks_index_html_erb___2701780339293181440_70225784355180' + +Started POST "/__better_errors/ca7befa8f503abea/variables" for ::1 at 2019-04-11 13:38:14 -0700 +Started GET "/" for ::1 at 2019-04-11 13:39:17 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (1.8ms) +Completed 500 Internal Server Error in 403ms (ActiveRecord: 0.3ms) + + + +NameError - undefined local variable or method `books_path' for #<#:0x00007fbd6cba88e0>: + app/views/layouts/application.html.erb:18:in `_app_views_layouts_application_html_erb__2696284633794492919_70225774924140' + +Started POST "/__better_errors/cb5820c813c6c123/variables" for ::1 at 2019-04-11 13:39:18 -0700 +Started GET "/" for ::1 at 2019-04-11 13:40:25 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.7ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (3.9ms) +Completed 200 OK in 34ms (Views: 31.2ms | ActiveRecord: 0.7ms) + + +Started POST "/__better_errors/e64a5e564ac13a5c/variables" for ::1 at 2019-04-11 13:40:28 -0700 +Started GET "/tasks" for ::1 at 2019-04-11 13:40:55 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.6ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (3.0ms) +Completed 200 OK in 33ms (Views: 30.8ms | ActiveRecord: 0.6ms) + + +Started GET "/tasks" for ::1 at 2019-04-11 13:40:57 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (5.7ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (7.9ms) +Completed 200 OK in 38ms (Views: 30.4ms | ActiveRecord: 5.7ms) + + +Started GET "/tasks/new" for ::1 at 2019-04-11 13:41:00 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (3.5ms) +Completed 200 OK in 40ms (Views: 37.5ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks/new" for ::1 at 2019-04-11 13:56:00 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (2.2ms) +Completed 500 Internal Server Error in 40ms (ActiveRecord: 7.6ms) + + + +ActionController::UrlGenerationError - No route matches {:action=>"edit", :controller=>"tasks"}, missing required keys: [:id]: + app/views/layouts/application.html.erb:24:in `_app_views_layouts_application_html_erb__2696284633794492919_70225790683180' + +Started POST "/__better_errors/125aeb5ebf2eb3db/variables" for ::1 at 2019-04-11 13:56:00 -0700 +Started GET "/tasks" for ::1 at 2019-04-11 13:56:15 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (6.9ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (9.7ms) +Completed 500 Internal Server Error in 43ms (ActiveRecord: 6.9ms) + + + +ActionController::UrlGenerationError - No route matches {:action=>"edit", :controller=>"tasks"}, missing required keys: [:id]: + app/views/layouts/application.html.erb:24:in `_app_views_layouts_application_html_erb__2696284633794492919_70225783470020' + +Started POST "/__better_errors/9c9b3d2c2f0e7295/variables" for ::1 at 2019-04-11 13:56:16 -0700 +Started GET "/tasks" for ::1 at 2019-04-11 13:56:36 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (1.6ms) +Completed 500 Internal Server Error in 29ms (ActiveRecord: 0.3ms) + + + +ActionController::UrlGenerationError - No route matches {:action=>"edit", :controller=>"tasks"}, missing required keys: [:id]: + app/views/layouts/application.html.erb:24:in `_app_views_layouts_application_html_erb__2696284633794492919_70225782066220' + +Started POST "/__better_errors/24da2f96af3af148/variables" for ::1 at 2019-04-11 13:56:36 -0700 +Started GET "/tasks" for ::1 at 2019-04-11 14:03:34 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (1.0ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (19.5ms) +Completed 500 Internal Server Error in 39ms (ActiveRecord: 10.8ms) + + + +ActionController::UrlGenerationError - No route matches {:action=>"edit", :controller=>"tasks"}, missing required keys: [:id]: + app/views/layouts/application.html.erb:24:in `_app_views_layouts_application_html_erb__2696284633794492919_70225783701160' + +Started POST "/__better_errors/2525e3c0f2a10d03/variables" for ::1 at 2019-04-11 14:03:34 -0700 +Started GET "/tasks" for ::1 at 2019-04-11 14:03:53 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.6ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (13.8ms) +Completed 500 Internal Server Error in 41ms (ActiveRecord: 4.9ms) + + + +ActionController::UrlGenerationError - No route matches {:action=>"edit", :controller=>"tasks"}, missing required keys: [:id]: + app/views/layouts/application.html.erb:24:in `_app_views_layouts_application_html_erb__2696284633794492919_70225783749480' + +Started POST "/__better_errors/c347146812cf79b5/variables" for ::1 at 2019-04-11 14:03:53 -0700 +Started GET "/tasks" for ::1 at 2019-04-11 14:04:35 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (2.6ms) +Completed 500 Internal Server Error in 35ms (ActiveRecord: 0.4ms) + + + +ActionController::UrlGenerationError - No route matches {:action=>"edit", :controller=>"tasks"}, missing required keys: [:id]: + app/views/layouts/application.html.erb:24:in `_app_views_layouts_application_html_erb__2696284633794492919_70225791523440' + +Started POST "/__better_errors/880e9ca9cb50130e/variables" for ::1 at 2019-04-11 14:04:36 -0700 +Started GET "/tasks" for ::1 at 2019-04-11 14:06:38 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (13.5ms) +Completed 500 Internal Server Error in 49ms (ActiveRecord: 4.5ms) + + + +ActionController::UrlGenerationError - No route matches {:action=>"edit", :controller=>"tasks"}, missing required keys: [:id]: + app/views/layouts/application.html.erb:24:in `_app_views_layouts_application_html_erb__2696284633794492919_70225783453200' + +Started POST "/__better_errors/936082f1fc3f35d9/variables" for ::1 at 2019-04-11 14:06:38 -0700 +Started GET "/tasks" for ::1 at 2019-04-11 14:07:18 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (12.4ms) +Completed 500 Internal Server Error in 39ms (ActiveRecord: 5.7ms) + + + +ActionController::UrlGenerationError - No route matches {:action=>"edit", :controller=>"tasks"}, missing required keys: [:id]: + app/views/layouts/application.html.erb:24:in `_app_views_layouts_application_html_erb__2696284633794492919_70225775845240' + +Started POST "/__better_errors/df25be1d4e6d4489/variables" for ::1 at 2019-04-11 14:07:18 -0700 +Started GET "/tasks" for ::1 at 2019-04-11 14:07:34 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (2.9ms) +Completed 200 OK in 32ms (Views: 29.6ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks/5/edit" for ::1 at 2019-04-11 14:07:43 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"5"} + Task Load (8.9ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 5], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:38 + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (5.1ms) +Completed 200 OK in 54ms (Views: 38.1ms | ActiveRecord: 10.1ms) + + +Started PATCH "/tasks/5" for ::1 at 2019-04-11 14:08:00 -0700 +Processing by TasksController#update as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"6ZtF5LveWGhr8cPcfRQfdtyoiLV+bI7tnYOWqczU8pfYmARmkDJMp0V8zvv6AU7Y+8ye13Q1ETZHGoi1R8GECw==", "task"=>{"name"=>"Cookin", "description"=>"Prepare lunch", "completion_date"=>""}, "commit"=>"Edit it!", "id"=>"5"} +Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.0ms) + + + +RuntimeError - "✓", "_method"=>"patch", "authenticity_token"=>"6ZtF5LveWGhr8cPcfRQfdtyoiLV+bI7tnYOWqczU8pfYmARmkDJMp0V8zvv6AU7Y+8ye13Q1ETZHGoi1R8GECw==", "task"=>{"name"=>"Cookin", "description"=>"Prepare lunch", "completion_date"=>""}, "commit"=>"Edit it!", "controller"=>"tasks", "action"=>"update", "id"=>"5"} permitted: false>: + app/controllers/tasks_controller.rb:42:in `update' + +Started POST "/__better_errors/e1f8bb2ddc9cc53c/variables" for ::1 at 2019-04-11 14:08:00 -0700 +Started GET "/tasks/" for ::1 at 2019-04-11 14:10:50 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (2.1ms) +Completed 500 Internal Server Error in 369ms (ActiveRecord: 0.4ms) + + + +NameError - undefined local variable or method `id' for #<#:0x00007fbd6cf72250>: + app/views/layouts/application.html.erb:24:in `_app_views_layouts_application_html_erb__2696284633794492919_70225776857280' + +Started POST "/__better_errors/1fab858b98e00336/variables" for ::1 at 2019-04-11 14:10:51 -0700 +Started GET "/tasks/" for ::1 at 2019-04-11 14:11:05 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (1.0ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (3.2ms) +Completed 200 OK in 35ms (Views: 32.1ms | ActiveRecord: 1.0ms) + + +Started GET "/tasks/id/edit" for ::1 at 2019-04-11 14:11:54 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"id"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 0], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:38 +Completed 404 Not Found in 3ms (ActiveRecord: 0.4ms) + + + +ActiveRecord::RecordNotFound - Couldn't find Task with 'id'=id: + app/controllers/tasks_controller.rb:38:in `edit' + +Started POST "/__better_errors/0f989f994e2f07e2/variables" for ::1 at 2019-04-11 14:11:54 -0700 +Started GET "/tasks" for ::1 at 2019-04-11 14:13:42 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.6ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (3.7ms) +Completed 200 OK in 38ms (Views: 36.0ms | ActiveRecord: 0.6ms) + + +Started GET "/tasks/id/edit" for ::1 at 2019-04-11 14:13:48 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"id"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 0], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:38 +Completed 404 Not Found in 2ms (ActiveRecord: 0.4ms) + + + +ActiveRecord::RecordNotFound - Couldn't find Task with 'id'=id: + app/controllers/tasks_controller.rb:38:in `edit' + +Started POST "/__better_errors/a41d40abed7bab7a/variables" for ::1 at 2019-04-11 14:13:48 -0700 +Started GET "/tasks" for ::1 at 2019-04-11 14:15:22 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (20.4ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (24.2ms) +Completed 200 OK in 59ms (Views: 36.5ms | ActiveRecord: 20.4ms) + + +Started GET "/tasks/1/edit" for ::1 at 2019-04-11 14:15:25 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"1"} + Task Load (0.7ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:38 + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (3.5ms) +Completed 200 OK in 39ms (Views: 35.8ms | ActiveRecord: 0.7ms) + + +Started PATCH "/tasks/1" for ::1 at 2019-04-11 14:17:09 -0700 +Processing by TasksController#update as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"kdE0JHQ02nk0+FP5I2231iiAvTItP+AyBOrtgrEfN7fylXoVj9Pkts6Jiy5oS0O+XPhsAERPwmU1sPdW4P+pmw==", "task"=>{"name"=>"Study", "description"=>"Read the hotel document", "completion_date"=>""}, "commit"=>"Edit it!", "id"=>"1"} +Completed 500 Internal Server Error in 1ms (ActiveRecord: 0.0ms) + + + +RuntimeError - "✓", "_method"=>"patch", "authenticity_token"=>"kdE0JHQ02nk0+FP5I2231iiAvTItP+AyBOrtgrEfN7fylXoVj9Pkts6Jiy5oS0O+XPhsAERPwmU1sPdW4P+pmw==", "task"=>{"name"=>"Study", "description"=>"Read the hotel document", "completion_date"=>""}, "commit"=>"Edit it!", "controller"=>"tasks", "action"=>"update", "id"=>"1"} permitted: false>: + app/controllers/tasks_controller.rb:42:in `update' + +Started POST "/__better_errors/a48414534e04997e/variables" for ::1 at 2019-04-11 14:17:09 -0700 +Started GET "/tasks/" for ::1 at 2019-04-11 14:17:28 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (2.4ms) +Completed 200 OK in 36ms (Views: 33.8ms | ActiveRecord: 0.5ms) + + +Started GET "/tasks/2/edit" for ::1 at 2019-04-11 14:29:17 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"2"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 2], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:38 + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (2.9ms) +Completed 200 OK in 46ms (Views: 25.7ms | ActiveRecord: 8.1ms) + + +Started PATCH "/tasks/2" for ::1 at 2019-04-11 14:29:30 -0700 +Processing by TasksController#update as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"CuFaMPbnEdERZHuu5OcFL5LeyZz38GEksdIc2e0n8VlblT1y/UIe6fBhBPzneoLFMJHCL9CWH8KeIgMR+FgvMg==", "task"=>{"name"=>"Homework", "description"=>"Finish the project", "completion_date"=>""}, "commit"=>"Edit it!", "id"=>"2"} + Task Load (2.8ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 2], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:42 +  (1.6ms) BEGIN + ↳ app/controllers/tasks_controller.rb:43 + Task Update (4.6ms) UPDATE "tasks" SET "name" = $1, "description" = $2, "updated_at" = $3 WHERE "tasks"."id" = $4 [["name", nil], ["description", nil], ["updated_at", "2019-04-11 21:29:30.573311"], ["id", 2]] + ↳ app/controllers/tasks_controller.rb:43 +  (1.3ms) COMMIT + ↳ app/controllers/tasks_controller.rb:43 +Redirected to http://localhost:3000/tasks/2 +Completed 302 Found in 15ms (ActiveRecord: 10.2ms) + + +Started GET "/tasks/2" for ::1 at 2019-04-11 14:29:30 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"2"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 2], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:15 + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.6ms) +Completed 200 OK in 25ms (Views: 20.3ms | ActiveRecord: 0.4ms) + + +Started GET "/tasks/2" for ::1 at 2019-04-11 14:31:20 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"2"} + Task Load (0.9ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 2], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:15 + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.8ms) +Completed 200 OK in 29ms (Views: 25.2ms | ActiveRecord: 0.9ms) + + +Started GET "/tasks" for ::1 at 2019-04-11 14:34:01 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (20.1ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (23.8ms) +Completed 200 OK in 54ms (Views: 32.3ms | ActiveRecord: 20.1ms) + + +Started GET "/tassks" for ::1 at 2019-04-11 14:34:05 -0700 + +ActionController::RoutingError (No route matches [GET] "/tassks"): + +actionpack (5.2.3) lib/action_dispatch/middleware/debug_exceptions.rb:65:in `call' +web-console (3.7.0) lib/web_console/middleware.rb:135:in `call_app' +web-console (3.7.0) lib/web_console/middleware.rb:30:in `block in call' +web-console (3.7.0) lib/web_console/middleware.rb:20:in `catch' +web-console (3.7.0) lib/web_console/middleware.rb:20:in `call' +actionpack (5.2.3) lib/action_dispatch/middleware/show_exceptions.rb:33:in `call' +railties (5.2.3) lib/rails/rack/logger.rb:38:in `call_app' +railties (5.2.3) lib/rails/rack/logger.rb:26:in `block in call' +activesupport (5.2.3) lib/active_support/tagged_logging.rb:71:in `block in tagged' +activesupport (5.2.3) lib/active_support/tagged_logging.rb:28:in `tagged' +activesupport (5.2.3) lib/active_support/tagged_logging.rb:71:in `tagged' +railties (5.2.3) lib/rails/rack/logger.rb:26:in `call' +sprockets-rails (3.2.1) lib/sprockets/rails/quiet_assets.rb:13:in `call' +actionpack (5.2.3) lib/action_dispatch/middleware/remote_ip.rb:81:in `call' +actionpack (5.2.3) lib/action_dispatch/middleware/request_id.rb:27:in `call' +rack (2.0.7) lib/rack/method_override.rb:22:in `call' +rack (2.0.7) lib/rack/runtime.rb:22:in `call' +activesupport (5.2.3) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call' +actionpack (5.2.3) lib/action_dispatch/middleware/executor.rb:14:in `call' +actionpack (5.2.3) lib/action_dispatch/middleware/static.rb:127:in `call' +rack (2.0.7) lib/rack/sendfile.rb:111:in `call' +railties (5.2.3) lib/rails/engine.rb:524:in `call' +puma (3.12.1) lib/puma/configuration.rb:227:in `call' +puma (3.12.1) lib/puma/server.rb:660:in `handle_request' +puma (3.12.1) lib/puma/server.rb:474:in `process_client' +puma (3.12.1) lib/puma/server.rb:334:in `block in run' +puma (3.12.1) lib/puma/thread_pool.rb:135:in `block in spawn_thread' +Started GET "/tasks/5/edit" for ::1 at 2019-04-11 14:34:18 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"5"} + Task Load (0.8ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 5], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:38 + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (2.9ms) +Completed 200 OK in 35ms (Views: 31.6ms | ActiveRecord: 0.8ms) + + +Started PATCH "/tasks/5" for ::1 at 2019-04-11 14:34:23 -0700 +Processing by TasksController#update as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"Ti2c7B9dbiuwzUhcnHLMGAMf0B3eRG0UljUpTONTnXl/Lt1uNLF65J5ARXsbZ522JHvGf9Qd8s9MrDdQaEbr5Q==", "task"=>{"name"=>"Cooking", "description"=>"Prepare dinner", "completion_date"=>""}, "commit"=>"Edit it!", "id"=>"5"} + Task Load (2.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 5], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:42 +  (0.4ms) BEGIN + ↳ app/controllers/tasks_controller.rb:43 + Task Update (2.3ms) UPDATE "tasks" SET "name" = $1, "description" = $2, "updated_at" = $3 WHERE "tasks"."id" = $4 [["name", nil], ["description", nil], ["updated_at", "2019-04-11 21:34:23.691920"], ["id", 5]] + ↳ app/controllers/tasks_controller.rb:43 +  (1.0ms) COMMIT + ↳ app/controllers/tasks_controller.rb:43 +Redirected to http://localhost:3000/tasks/5 +Completed 302 Found in 12ms (ActiveRecord: 6.0ms) + + +Started GET "/tasks/5" for ::1 at 2019-04-11 14:34:23 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"5"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 5], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:15 + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.6ms) +Completed 200 OK in 26ms (Views: 23.6ms | ActiveRecord: 0.3ms) + + +Started PATCH "/tasks/5" for ::1 at 2019-04-11 14:34:48 -0700 +Processing by TasksController#update as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"TyPALfA+rJz2D9xKhwK8MGoJgvYzIpoXEIsj4euwZB0yheF77dtMNn30n5jUzweQNvHiUIKnGGEJ9Cu8tL2eHQ==", "task"=>{"name"=>"Cooking", "description"=>"Prepare dinner", "completion_date"=>""}, "commit"=>"Edit it!", "id"=>"5"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 5], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:42 +  (0.5ms) BEGIN + ↳ app/controllers/tasks_controller.rb:43 +  (1.1ms) COMMIT + ↳ app/controllers/tasks_controller.rb:43 +Redirected to http://localhost:3000/tasks/5 +Completed 302 Found in 6ms (ActiveRecord: 2.0ms) + + +Started GET "/tasks/5" for ::1 at 2019-04-11 14:34:48 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"5"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 5], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:15 + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.8ms) +Completed 200 OK in 32ms (Views: 24.3ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for ::1 at 2019-04-11 14:35:40 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (4.1ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (6.6ms) +Completed 200 OK in 36ms (Views: 29.8ms | ActiveRecord: 4.1ms) + + +Started GET "/tasks/3/edit" for ::1 at 2019-04-11 14:36:36 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"3"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 3], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:38 + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (8.4ms) +Completed 200 OK in 45ms (Views: 42.5ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks/8/edit" for ::1 at 2019-04-11 14:36:56 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"8"} + Task Load (1.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 8], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:38 + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (7.6ms) +Completed 200 OK in 44ms (Views: 38.7ms | ActiveRecord: 1.1ms) + + +Started POST "/tasks/8/edit" for ::1 at 2019-04-11 14:37:35 -0700 + +ActionController::RoutingError (No route matches [POST] "/tasks/8/edit"): + +actionpack (5.2.3) lib/action_dispatch/middleware/debug_exceptions.rb:65:in `call' +web-console (3.7.0) lib/web_console/middleware.rb:135:in `call_app' +web-console (3.7.0) lib/web_console/middleware.rb:30:in `block in call' +web-console (3.7.0) lib/web_console/middleware.rb:20:in `catch' +web-console (3.7.0) lib/web_console/middleware.rb:20:in `call' +actionpack (5.2.3) lib/action_dispatch/middleware/show_exceptions.rb:33:in `call' +railties (5.2.3) lib/rails/rack/logger.rb:38:in `call_app' +railties (5.2.3) lib/rails/rack/logger.rb:26:in `block in call' +activesupport (5.2.3) lib/active_support/tagged_logging.rb:71:in `block in tagged' +activesupport (5.2.3) lib/active_support/tagged_logging.rb:28:in `tagged' +activesupport (5.2.3) lib/active_support/tagged_logging.rb:71:in `tagged' +railties (5.2.3) lib/rails/rack/logger.rb:26:in `call' +sprockets-rails (3.2.1) lib/sprockets/rails/quiet_assets.rb:13:in `call' +actionpack (5.2.3) lib/action_dispatch/middleware/remote_ip.rb:81:in `call' +actionpack (5.2.3) lib/action_dispatch/middleware/request_id.rb:27:in `call' +rack (2.0.7) lib/rack/method_override.rb:22:in `call' +rack (2.0.7) lib/rack/runtime.rb:22:in `call' +activesupport (5.2.3) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call' +actionpack (5.2.3) lib/action_dispatch/middleware/executor.rb:14:in `call' +actionpack (5.2.3) lib/action_dispatch/middleware/static.rb:127:in `call' +rack (2.0.7) lib/rack/sendfile.rb:111:in `call' +railties (5.2.3) lib/rails/engine.rb:524:in `call' +puma (3.12.1) lib/puma/configuration.rb:227:in `call' +puma (3.12.1) lib/puma/server.rb:660:in `handle_request' +puma (3.12.1) lib/puma/server.rb:474:in `process_client' +puma (3.12.1) lib/puma/server.rb:334:in `block in run' +puma (3.12.1) lib/puma/thread_pool.rb:135:in `block in spawn_thread' +Started GET "/tasks" for ::1 at 2019-04-11 14:40:59 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.7ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (3.9ms) +Completed 200 OK in 36ms (Views: 31.0ms | ActiveRecord: 0.7ms) + + +Started GET "/tasks/3/edit" for ::1 at 2019-04-11 14:41:01 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"3"} + Task Load (2.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 3], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:38 + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (4.1ms) +Completed 200 OK in 46ms (Views: 37.8ms | ActiveRecord: 2.4ms) + + +Started PATCH "/tasks/3" for ::1 at 2019-04-11 14:41:09 -0700 +Processing by TasksController#update as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"lPeYPLy7iVo899ln/nyApztG/qOaCo2leyhr7wy5pzHAtT2isfRNuP0M7PG1KnA+Jfv1i1RFjkwu6TusISkU6g==", "task"=>{"name"=>"housework", "description"=>"Do your ", "completion_date"=>""}, "commit"=>"Edit it!", "id"=>"3"} + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 3], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:42 +  (0.5ms) BEGIN + ↳ app/controllers/tasks_controller.rb:43 + Task Update (1.0ms) UPDATE "tasks" SET "name" = $1, "description" = $2, "updated_at" = $3 WHERE "tasks"."id" = $4 [["name", nil], ["description", nil], ["updated_at", "2019-04-11 21:41:09.979922"], ["id", 3]] + ↳ app/controllers/tasks_controller.rb:43 +  (0.9ms) COMMIT + ↳ app/controllers/tasks_controller.rb:43 +Redirected to http://localhost:3000/tasks/3 +Completed 302 Found in 8ms (ActiveRecord: 2.9ms) + + +Started GET "/tasks/3" for ::1 at 2019-04-11 14:41:09 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"3"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 3], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:15 + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.7ms) +Completed 200 OK in 49ms (Views: 46.3ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks" for ::1 at 2019-04-11 14:41:19 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (6.3ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (8.9ms) +Completed 200 OK in 39ms (Views: 30.7ms | ActiveRecord: 6.3ms) + + +Started GET "/tasks/3" for ::1 at 2019-04-11 14:41:30 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"3"} + Task Load (0.6ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 3], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:15 + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.5ms) +Completed 200 OK in 32ms (Views: 28.6ms | ActiveRecord: 0.6ms) + + +Started GET "/tasks/" for ::1 at 2019-04-11 14:42:06 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (2.9ms) +Completed 200 OK in 36ms (Views: 33.5ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks/1" for ::1 at 2019-04-11 14:42:15 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"1"} + Task Load (3.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:15 + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.7ms) +Completed 200 OK in 33ms (Views: 27.0ms | ActiveRecord: 3.2ms) + + +Started GET "/tasks/2" for ::1 at 2019-04-11 14:42:22 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"2"} + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 2], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:15 + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.6ms) +Completed 200 OK in 37ms (Views: 33.1ms | ActiveRecord: 0.5ms) + + +Started GET "/tasks/4" for ::1 at 2019-04-11 14:42:28 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"4"} + Task Load (3.9ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 4], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:15 + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.8ms) +Completed 200 OK in 38ms (Views: 31.5ms | ActiveRecord: 3.9ms) + + +Started GET "/tasks/5" for ::1 at 2019-04-11 14:42:41 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"5"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 5], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:15 + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.7ms) +Completed 200 OK in 34ms (Views: 31.1ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks/" for ::1 at 2019-04-11 14:46:16 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (14.1ms) +Completed 200 OK in 56ms (Views: 48.1ms | ActiveRecord: 4.9ms) + + +Started GET "/tasks/1/edit" for ::1 at 2019-04-11 14:46:19 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"1"} + Task Load (4.8ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:38 + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (3.2ms) +Completed 200 OK in 41ms (Views: 32.3ms | ActiveRecord: 4.8ms) + + +Started PATCH "/tasks/1" for ::1 at 2019-04-11 14:46:30 -0700 +Processing by TasksController#update as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"803m2bB0T7XHaWEwh7zusjEE2s2WNSLbS1j5zM4NzUqQCajoS5Nxej0YuefMmhraRXwL//9FAIx6AuMYn+1TZg==", "task"=>{"name"=>"Study", "description"=>"Read the lecture for friday", "completion_date"=>""}, "commit"=>"Edit it!", "id"=>"1"} + Task Load (0.8ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:42 +  (0.2ms) BEGIN + ↳ app/controllers/tasks_controller.rb:43 + Task Update (0.9ms) UPDATE "tasks" SET "description" = $1, "updated_at" = $2 WHERE "tasks"."id" = $3 [["description", "Read the lecture for friday"], ["updated_at", "2019-04-11 21:46:30.305949"], ["id", 1]] + ↳ app/controllers/tasks_controller.rb:43 +  (2.1ms) COMMIT + ↳ app/controllers/tasks_controller.rb:43 +Redirected to http://localhost:3000/tasks/1 +Completed 302 Found in 9ms (ActiveRecord: 4.0ms) + + +Started GET "/tasks/1" for ::1 at 2019-04-11 14:46:30 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"1"} + Task Load (0.6ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:15 + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.9ms) +Completed 200 OK in 28ms (Views: 23.8ms | ActiveRecord: 0.6ms) + + +Started GET "/tasks" for ::1 at 2019-04-11 14:46:39 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (7.1ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (10.1ms) +Completed 200 OK in 40ms (Views: 31.0ms | ActiveRecord: 7.1ms) + + +Started GET "/tasks/6/edit" for ::1 at 2019-04-11 14:47:31 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"6"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 6], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:38 + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (4.6ms) +Completed 200 OK in 38ms (Views: 21.2ms | ActiveRecord: 4.6ms) + + +Started PATCH "/tasks/6" for ::1 at 2019-04-11 14:47:42 -0700 +Processing by TasksController#update as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"hbo868godqwTjdNM6O/EqA6OGEi1poq9aEq+RCMCnLGe2sRFA8/0YhTtE6PWnR3xDec838XdXhFs8yuJ5C/5yg==", "task"=>{"name"=>"play", "description"=>"play some bord game", "completion_date"=>""}, "commit"=>"Edit it!", "id"=>"6"} + Task Load (4.0ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 6], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:42 +  (1.5ms) BEGIN + ↳ app/controllers/tasks_controller.rb:43 + Task Update (0.5ms) UPDATE "tasks" SET "name" = $1, "updated_at" = $2 WHERE "tasks"."id" = $3 [["name", "play"], ["updated_at", "2019-04-11 21:47:42.930910"], ["id", 6]] + ↳ app/controllers/tasks_controller.rb:43 +  (0.5ms) COMMIT + ↳ app/controllers/tasks_controller.rb:43 +Redirected to http://localhost:3000/tasks/6 +Completed 302 Found in 12ms (ActiveRecord: 6.5ms) + + +Started GET "/tasks/6" for ::1 at 2019-04-11 14:47:42 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"6"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 6], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:15 + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.9ms) +Completed 200 OK in 34ms (Views: 24.7ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for ::1 at 2019-04-11 14:48:09 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (13.1ms) +Completed 200 OK in 44ms (Views: 36.0ms | ActiveRecord: 3.7ms) + + +Started GET "/tasks/8/edit" for ::1 at 2019-04-11 14:48:12 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"8"} + Task Load (0.8ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 8], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:38 + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (4.0ms) +Completed 200 OK in 69ms (Views: 62.8ms | ActiveRecord: 0.8ms) + + +Started PATCH "/tasks/8" for ::1 at 2019-04-11 14:48:18 -0700 +Processing by TasksController#update as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"C87jqRX8pHodgzcjwrD6l1Z5RRgIf4C0i740UCtdXB0jkCYgXpsD8BsjYa6I3OVy1Z2e/NHn3cRwzKSWiv1RMA==", "task"=>{"name"=>"Wash", "description"=>"turn on the dishwasher", "completion_date"=>""}, "commit"=>"Edit it!", "id"=>"8"} + Task Load (1.0ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 8], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:42 +  (2.5ms) BEGIN + ↳ app/controllers/tasks_controller.rb:43 + Task Update (0.5ms) UPDATE "tasks" SET "name" = $1, "updated_at" = $2 WHERE "tasks"."id" = $3 [["name", "Wash"], ["updated_at", "2019-04-11 21:48:18.540552"], ["id", 8]] + ↳ app/controllers/tasks_controller.rb:43 +  (0.5ms) COMMIT + ↳ app/controllers/tasks_controller.rb:43 +Redirected to http://localhost:3000/tasks +Completed 302 Found in 11ms (ActiveRecord: 4.5ms) + + +Started GET "/tasks" for ::1 at 2019-04-11 14:48:18 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.7ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (3.6ms) +Completed 200 OK in 28ms (Views: 26.3ms | ActiveRecord: 0.7ms) + + +Started GET "/tasks/3/edit" for ::1 at 2019-04-11 14:48:47 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"3"} + Task Load (7.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 3], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:38 + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (3.7ms) +Completed 200 OK in 44ms (Views: 33.2ms | ActiveRecord: 7.3ms) + + +Started PATCH "/tasks/3" for ::1 at 2019-04-11 14:49:52 -0700 +Processing by TasksController#update as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"6MUcCqhfaXajm1nottIW5J/u5h3v3z4216UNLbXU8sG8h7mUpRCtlGJgbH79hOZ9gVPtNSGQPd+CZF1umERBGg==", "task"=>{"name"=>"clay", "description"=>"google how to", "completion_date"=>""}, "commit"=>"Edit it!", "id"=>"3"} + Task Load (0.7ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 3], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:42 +  (0.2ms) BEGIN + ↳ app/controllers/tasks_controller.rb:43 + Task Update (4.1ms) UPDATE "tasks" SET "name" = $1, "description" = $2, "updated_at" = $3 WHERE "tasks"."id" = $4 [["name", "clay"], ["description", "google how to"], ["updated_at", "2019-04-11 21:49:52.216041"], ["id", 3]] + ↳ app/controllers/tasks_controller.rb:43 +  (0.5ms) COMMIT + ↳ app/controllers/tasks_controller.rb:43 +Redirected to http://localhost:3000/tasks +Completed 302 Found in 11ms (ActiveRecord: 5.6ms) + + +Started GET "/tasks" for ::1 at 2019-04-11 14:49:52 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.8ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (3.6ms) +Completed 200 OK in 32ms (Views: 30.0ms | ActiveRecord: 0.8ms) + + +Started GET "/tasks/1/edit" for ::1 at 2019-04-11 14:52:15 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"1"} + Task Load (3.0ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:38 + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (3.4ms) +Completed 200 OK in 45ms (Views: 38.5ms | ActiveRecord: 3.0ms) + + +Started GET "/tasks/new" for ::1 at 2019-04-11 14:52:24 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (3.1ms) +Completed 200 OK in 32ms (Views: 29.2ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks/new" for ::1 at 2019-04-11 14:58:46 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (2.8ms) +Completed 200 OK in 53ms (Views: 27.7ms | ActiveRecord: 12.2ms) + + +Started GET "/tasks" for ::1 at 2019-04-11 14:58:54 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (13.9ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (16.9ms) +Completed 200 OK in 48ms (Views: 31.8ms | ActiveRecord: 13.9ms) + + +Started GET "/tasks/5/edit" for ::1 at 2019-04-11 14:59:02 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"5"} + Task Load (8.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 5], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:38 + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (32.1ms) +Completed 200 OK in 70ms (Views: 54.6ms | ActiveRecord: 9.3ms) + + +Started PATCH "/tasks/5" for ::1 at 2019-04-11 14:59:18 -0700 +Processing by TasksController#update as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"Fww1LJfyygs9PkYAfJBo0kq8O+vIzKIgAAdRxK8olcEmD3SuvB7exBOzSyf7hTl8bdgticKVPfvank/YJD3jXQ==", "task"=>{"name"=>"Cooking", "description"=>"cook me a dinner", "completion_date"=>""}, "commit"=>"Edit it!", "id"=>"5"} + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 5], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:42 +  (1.0ms) BEGIN + ↳ app/controllers/tasks_controller.rb:43 + Task Update (1.3ms) UPDATE "tasks" SET "name" = $1, "description" = $2, "updated_at" = $3 WHERE "tasks"."id" = $4 [["name", "Cooking"], ["description", "cook me a dinner"], ["updated_at", "2019-04-11 21:59:18.354981"], ["id", 5]] + ↳ app/controllers/tasks_controller.rb:43 +  (3.3ms) COMMIT + ↳ app/controllers/tasks_controller.rb:43 +Redirected to http://localhost:3000/tasks/5 +Completed 302 Found in 12ms (ActiveRecord: 6.0ms) + + +Started GET "/tasks/5" for ::1 at 2019-04-11 14:59:18 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"5"} + Task Load (4.6ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 5], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:15 + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.6ms) +Completed 200 OK in 35ms (Views: 25.7ms | ActiveRecord: 4.6ms) + + +Started GET "/tasks/" for ::1 at 2019-04-11 15:12:57 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.7ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (25.1ms) +Completed 200 OK in 53ms (Views: 35.4ms | ActiveRecord: 14.6ms) + + +Started GET "/tasks/2/edit" for ::1 at 2019-04-11 15:12:59 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"2"} + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 2], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:39 + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (4.8ms) +Completed 200 OK in 31ms (Views: 25.6ms | ActiveRecord: 0.9ms) + + +Started PATCH "/tasks/2" for ::1 at 2019-04-11 15:13:09 -0700 +Processing by TasksController#update as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"LkCcbUH5jCnLGpQdzL+LqnLNRz3q6yFgXVGIHpXoSrh/NPsvSlyDESof60/PIgxA0IJMjs2NX4ZyoZfWgJeU0w==", "task"=>{"name"=>"read", "description"=>"read a book", "completion_date"=>""}, "commit"=>"Edit it!", "id"=>"2"} + Task Load (2.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 2], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:43 +  (0.2ms) BEGIN + ↳ app/controllers/tasks_controller.rb:44 + Task Update (6.9ms) UPDATE "tasks" SET "name" = $1, "description" = $2, "updated_at" = $3 WHERE "tasks"."id" = $4 [["name", "read"], ["description", "read a book"], ["updated_at", "2019-04-11 22:13:09.216505"], ["id", 2]] + ↳ app/controllers/tasks_controller.rb:44 +  (1.1ms) COMMIT + ↳ app/controllers/tasks_controller.rb:44 +Redirected to http://localhost:3000/tasks/2 +Completed 302 Found in 17ms (ActiveRecord: 10.5ms) + + +Started GET "/tasks/2" for ::1 at 2019-04-11 15:13:09 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"2"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 2], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:15 + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.9ms) +Completed 200 OK in 23ms (Views: 20.1ms | ActiveRecord: 0.3ms) + + +Started PATCH "/tasks/2" for ::1 at 2019-04-11 15:15:21 -0700 +Processing by TasksController#update as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"CIOjIRDL7UdWFNW/P2+jIJXP1f05mWyJCYhBM0b4ucN1JYJ3DS4N7d3vlm1sohiAyTe1W4gc7v8Q90luGfVDww==", "task"=>{"name"=>"read", "description"=>"read a book", "completion_date"=>""}, "commit"=>"Edit it!", "id"=>"2"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 2], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:43 +  (0.2ms) BEGIN + ↳ app/controllers/tasks_controller.rb:44 +  (0.2ms) COMMIT + ↳ app/controllers/tasks_controller.rb:44 +Redirected to http://localhost:3000/tasks/2 +Completed 302 Found in 19ms (ActiveRecord: 4.0ms) + + +Started GET "/tasks/2" for ::1 at 2019-04-11 15:15:22 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"2"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 2], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:15 + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.4ms) +Completed 200 OK in 41ms (Views: 38.7ms | ActiveRecord: 0.3ms) + + +Started PATCH "/tasks/2" for ::1 at 2019-04-11 15:15:39 -0700 +Processing by TasksController#update as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"CIOjIRDL7UdWFNW/P2+jIJXP1f05mWyJCYhBM0b4ucN1JYJ3DS4N7d3vlm1sohiAyTe1W4gc7v8Q90luGfVDww==", "task"=>{"name"=>"read77", "description"=>"read a book", "completion_date"=>""}, "commit"=>"Edit it!", "id"=>"2"} + Task Load (0.6ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 2], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:43 +  (0.6ms) BEGIN + ↳ app/controllers/tasks_controller.rb:44 + Task Update (0.6ms) UPDATE "tasks" SET "name" = $1, "updated_at" = $2 WHERE "tasks"."id" = $3 [["name", "read77"], ["updated_at", "2019-04-11 22:15:39.083725"], ["id", 2]] + ↳ app/controllers/tasks_controller.rb:44 +  (0.5ms) COMMIT + ↳ app/controllers/tasks_controller.rb:44 +Redirected to http://localhost:3000/tasks/2 +Completed 302 Found in 7ms (ActiveRecord: 2.3ms) + + +Started GET "/tasks/2" for ::1 at 2019-04-11 15:15:39 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"2"} + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 2], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:15 + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.7ms) +Completed 200 OK in 27ms (Views: 23.7ms | ActiveRecord: 0.5ms) + + diff --git a/log/test.log b/log/test.log index 0bf2cb63f..fa05113a5 100644 --- a/log/test.log +++ b/log/test.log @@ -1036,3 +1036,1125 @@ Processing by TasksController#show as HTML Redirected to http://www.example.com/tasks Completed 302 Found in 3ms (ActiveRecord: 0.4ms)  (0.2ms) ROLLBACK +  (2.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.1ms) BEGIN +  (0.3ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (2.1ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-11 22:00:54.801553', '2019-04-11 22:00:54.801553'), (298486374, 'MyString', 'MyString', NULL, '2019-04-11 22:00:54.801553', '2019-04-11 22:00:54.801553') +  (0.8ms) COMMIT +  (0.2ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-11 15:00:54 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 9ms (ActiveRecord: 0.5ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (2.8ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-11 15:00:54 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.5ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-11 22:00:54.863364"], ["updated_at", "2019-04-11 22:00:54.863364"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 10ms (ActiveRecord: 0.9ms) +  (0.4ms) SELECT COUNT(*) FROM "tasks" + Task Load (1.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.3ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-11 15:00:54 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (16.5ms) +Completed 200 OK in 190ms (Views: 189.3ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-11 15:00:55 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.3ms) +Completed 200 OK in 6ms (Views: 3.8ms | ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-11 15:00:55 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.1ms) +Completed 200 OK in 3ms (Views: 2.0ms | ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.1ms) BEGIN +  (0.3ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.5ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-11 22:03:18.898273', '2019-04-11 22:03:18.898273'), (298486374, 'MyString', 'MyString', NULL, '2019-04-11 22:03:18.898273', '2019-04-11 22:03:18.898273') +  (1.0ms) COMMIT +  (0.3ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-11 15:03:18 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (8.1ms) +Completed 200 OK in 147ms (Views: 142.2ms | ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-11 15:03:19 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.4ms) +Completed 200 OK in 4ms (Views: 2.8ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-11 15:03:19 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.4ms) +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-11 15:03:19 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (5.0ms) +Completed 200 OK in 7ms (Views: 6.1ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.4ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-11 15:03:19 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-11 22:03:19.106315"], ["updated_at", "2019-04-11 22:03:19.106315"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.6ms) +  (0.2ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) BEGIN +  (0.3ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.5ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-11 22:05:26.801377', '2019-04-11 22:05:26.801377'), (298486374, 'MyString', 'MyString', NULL, '2019-04-11 22:05:26.801377', '2019-04-11 22:05:26.801377') +  (1.0ms) COMMIT +  (0.2ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-11 15:05:26 -0700 +Processing by TasksController#new as HTML +Completed 500 Internal Server Error in 8ms (ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-11 15:05:26 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 4ms (ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-11 15:05:26 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.1ms) +Completed 200 OK in 143ms (Views: 142.1ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-11 15:05:26 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.3ms) +Completed 200 OK in 4ms (Views: 2.7ms | ActiveRecord: 0.4ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-11 15:05:27 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-11 22:05:27.008346"], ["updated_at", "2019-04-11 22:05:27.008346"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.6ms) +  (0.2ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) BEGIN +  (0.3ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.5ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-11 22:05:49.141102', '2019-04-11 22:05:49.141102'), (298486374, 'MyString', 'MyString', NULL, '2019-04-11 22:05:49.141102', '2019-04-11 22:05:49.141102') +  (1.2ms) COMMIT +  (0.2ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-11 15:05:49 -0700 +Processing by TasksController#new as HTML +Redirected to http://www.example.com/tasks +Completed 302 Found in 9ms (ActiveRecord: 0.0ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-11 15:05:49 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.2ms) +Completed 200 OK in 142ms (Views: 140.4ms | ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-11 15:05:49 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.2ms) +Completed 200 OK in 3ms (Views: 2.4ms | ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-11 15:05:49 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.4ms) +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-11 15:05:49 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-11 22:05:49.340425"], ["updated_at", "2019-04-11 22:05:49.340425"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.6ms) +  (0.2ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) BEGIN +  (0.4ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.5ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-11 22:06:26.250786', '2019-04-11 22:06:26.250786'), (298486374, 'MyString', 'MyString', NULL, '2019-04-11 22:06:26.250786', '2019-04-11 22:06:26.250786') +  (1.0ms) COMMIT +  (0.1ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.2ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-11 15:06:26 -0700 +Processing by TasksController#new as HTML +Completed 500 Internal Server Error in 9ms (ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +  (0.1ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-11 15:06:26 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.6ms) +Completed 200 OK in 139ms (Views: 137.6ms | ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-11 15:06:26 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.4ms) +Completed 200 OK in 3ms (Views: 2.6ms | ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-11 15:06:26 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.3ms) +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-11 15:06:26 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-11 22:06:26.451506"], ["updated_at", "2019-04-11 22:06:26.451506"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 0.6ms) +  (0.2ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) BEGIN +  (0.3ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.2ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.5ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-11 22:10:05.591199', '2019-04-11 22:10:05.591199'), (298486374, 'MyString', 'MyString', NULL, '2019-04-11 22:10:05.591199', '2019-04-11 22:10:05.591199') +  (1.3ms) COMMIT +  (0.3ms) BEGIN +  (0.3ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.2ms) COMMIT +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-11 15:10:05 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 7ms (ActiveRecord: 0.5ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-11 15:10:05 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (8.5ms) +Completed 200 OK in 245ms (Views: 243.7ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-11 15:10:05 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.4ms) +Completed 200 OK in 4ms (Views: 2.9ms | ActiveRecord: 0.4ms) +  (0.5ms) ROLLBACK +  (0.5ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-11 15:10:05 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (13.3ms) +Completed 200 OK in 26ms (Views: 19.6ms | ActiveRecord: 0.0ms) +  (0.3ms) ROLLBACK +  (0.3ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.4ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.7ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-11 15:10:05 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.5ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-11 22:10:05.935885"], ["updated_at", "2019-04-11 22:10:05.935885"]] +  (1.5ms) RELEASE SAVEPOINT active_record_1 +Completed 500 Internal Server Error in 6ms (ActiveRecord: 2.4ms) +  (0.4ms) ROLLBACK +  (0.9ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) BEGIN +  (0.4ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.5ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-11 22:12:00.710861', '2019-04-11 22:12:00.710861'), (298486374, 'MyString', 'MyString', NULL, '2019-04-11 22:12:00.710861', '2019-04-11 22:12:00.710861') +  (1.4ms) COMMIT +  (0.3ms) BEGIN +  (0.3ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.2ms) COMMIT +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-11 15:12:00 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (8.8ms) +Completed 200 OK in 244ms (Views: 238.4ms | ActiveRecord: 0.4ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-11 15:12:00 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.5ms) +Completed 200 OK in 4ms (Views: 2.9ms | ActiveRecord: 0.4ms) +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-11 15:12:01 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 0.5ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-11 15:12:01 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (8.0ms) +Completed 200 OK in 11ms (Views: 9.7ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.4ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-11 15:12:01 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-11 22:12:01.033590"], ["updated_at", "2019-04-11 22:12:01.033590"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks/980190963 +Completed 302 Found in 3ms (ActiveRecord: 0.7ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.1ms) ROLLBACK +  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) BEGIN +  (0.3ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.5ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-11 22:18:40.749862', '2019-04-11 22:18:40.749862'), (298486374, 'MyString', 'MyString', NULL, '2019-04-11 22:18:40.749862', '2019-04-11 22:18:40.749862') +  (1.1ms) COMMIT +  (0.3ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-11 15:18:40 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (8.8ms) +Completed 200 OK in 230ms (Views: 224.4ms | ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-11 15:18:41 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.4ms) +Completed 200 OK in 4ms (Views: 2.7ms | ActiveRecord: 0.4ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.2ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.4ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-11 15:18:41 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-11 22:18:41.020031"], ["updated_at", "2019-04-11 22:18:41.020031"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks/980190963 +Completed 302 Found in 3ms (ActiveRecord: 0.6ms) +  (0.2ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-11 15:18:41 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.2ms) +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-11 15:18:41 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (5.8ms) +Completed 200 OK in 8ms (Views: 7.0ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +  (0.2ms) ROLLBACK +  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) BEGIN +  (0.4ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.5ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-11 22:19:55.536061', '2019-04-11 22:19:55.536061'), (298486374, 'MyString', 'MyString', NULL, '2019-04-11 22:19:55.536061', '2019-04-11 22:19:55.536061') +  (1.3ms) COMMIT +  (0.2ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-11 15:19:55 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-11 22:19:55.576787"], ["updated_at", "2019-04-11 22:19:55.576787"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks/980190963 +Completed 302 Found in 13ms (ActiveRecord: 0.7ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-11 22:19:55.586398"], ["updated_at", "2019-04-11 22:19:55.586398"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190964" for 127.0.0.1 at 2019-04-11 15:19:55 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190964"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190964], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.8ms) +Completed 200 OK in 231ms (Views: 228.6ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-11 15:19:55 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-11 15:19:55 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.7ms) +Completed 200 OK in 4ms (Views: 2.9ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-11 15:19:55 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (0.8ms) +Completed 200 OK in 2ms (Views: 1.6ms | ActiveRecord: 0.2ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-11 15:19:55 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (5.1ms) +Completed 200 OK in 7ms (Views: 6.4ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.1ms) ROLLBACK +  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.1ms) BEGIN +  (0.3ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.6ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-11 22:20:45.914506', '2019-04-11 22:20:45.914506'), (298486374, 'MyString', 'MyString', NULL, '2019-04-11 22:20:45.914506', '2019-04-11 22:20:45.914506') +  (1.2ms) COMMIT +  (0.2ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.4ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-11 15:20:45 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.3ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-11 22:20:45.983052"], ["updated_at", "2019-04-11 22:20:45.983052"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks/980190963 +Completed 302 Found in 36ms (ActiveRecord: 0.7ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-11 15:20:45 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.1ms) +Completed 200 OK in 131ms (Views: 129.9ms | ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-11 15:20:46 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.2ms) +Completed 200 OK in 3ms (Views: 2.5ms | ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-11 15:20:46 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (5.5ms) +Completed 200 OK in 8ms (Views: 6.7ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-11 22:20:46.229033"], ["updated_at", "2019-04-11 22:20:46.229033"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190964" for 127.0.0.1 at 2019-04-11 15:20:46 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190964"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190964], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.4ms) +Completed 200 OK in 4ms (Views: 1.7ms | ActiveRecord: 0.2ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-11 15:20:46 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.3ms) +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) BEGIN +  (0.3ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.7ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-11 22:25:42.038074', '2019-04-11 22:25:42.038074'), (298486374, 'MyString', 'MyString', NULL, '2019-04-11 22:25:42.038074', '2019-04-11 22:25:42.038074') +  (0.6ms) COMMIT +  (0.1ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-11 15:25:42 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.5ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-11 22:25:42.077796"], ["updated_at", "2019-04-11 22:25:42.077796"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks/980190963 +Completed 302 Found in 8ms (ActiveRecord: 0.8ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-11 15:25:42 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.9ms) +Completed 200 OK in 145ms (Views: 143.4ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-11 15:25:42 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.2ms) +Completed 200 OK in 3ms (Views: 2.5ms | ActiveRecord: 0.3ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-11 22:25:42.244474"], ["updated_at", "2019-04-11 22:25:42.244474"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190964" for 127.0.0.1 at 2019-04-11 15:25:42 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190964"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190964], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.4ms) +Completed 200 OK in 4ms (Views: 1.5ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-11 15:25:42 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.2ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-11 15:25:42 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (5.0ms) +Completed 200 OK in 7ms (Views: 6.1ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK diff --git a/test/controllers/tasks_controller_test.rb b/test/controllers/tasks_controller_test.rb index 51c3a23ac..50e0db348 100644 --- a/test/controllers/tasks_controller_test.rb +++ b/test/controllers/tasks_controller_test.rb @@ -5,7 +5,7 @@ # you may need to modify this. let (:task) { Task.create name: "sample task", description: "this is an example for a test", - completed: false + completion_date: 2010-03-02 } # Tests for Wave 1 @@ -30,7 +30,7 @@ # Unskip these tests for Wave 2 describe "show" do it "can get a valid task" do - skip + # Act get task_path(task.id) @@ -50,7 +50,7 @@ describe "new" do it "can get the new task page" do - skip + # Act get new_task_path @@ -62,7 +62,7 @@ describe "create" do it "can create a new task" do - skip + # Arrange # Note to students: Your Task model **may** be different and @@ -82,7 +82,7 @@ new_task = Task.find_by(name: task_hash[:task][:name]) expect(new_task.description).must_equal task_hash[:task][:description] - expect(new_task.completed).must_equal task_hash[:task][:completed] + expect(new_task.completion_date).must_equal task_hash[:task][:completion_date] must_respond_with :redirect must_redirect_to task_path(new_task.id) @@ -93,7 +93,10 @@ describe "edit" do it "can get the edit page for an existing task" do skip - # Your code here + get edit_task_path + + # Assert + must_respond_with :success end it "will respond with redirect when attempting to edit a nonexistant task" do From ad8f59c6ac891431b9aed76a538b347e322b91a1 Mon Sep 17 00:00:00 2001 From: Bitaman Date: Fri, 12 Apr 2019 12:13:36 -0700 Subject: [PATCH 09/16] added the destroy method --- app/controllers/tasks_controller.rb | 16 +- app/views/tasks/index.html.erb | 2 + log/development.log | 284 ++++++ log/test.log | 1000 +++++++++++++++++++++ test/controllers/tasks_controller_test.rb | 29 +- 5 files changed, 1325 insertions(+), 6 deletions(-) diff --git a/app/controllers/tasks_controller.rb b/app/controllers/tasks_controller.rb index 3639647a4..16d9f5d72 100644 --- a/app/controllers/tasks_controller.rb +++ b/app/controllers/tasks_controller.rb @@ -36,7 +36,11 @@ def create redirect_to task_path(@task.id) end def edit - @task = Task.find(params[:id]) + @task = Task.find_by(id: params[:id]) + unless @task + + redirect_to tasks_path + end end def update @@ -44,6 +48,16 @@ def update @task.update(name: params["task"]["name"], description: params["task"]["description"], completion_date: params["task"]["completion_date"]) redirect_to task_path end + def destroy + @task = Task.find_by(id: params[:id]) + unless @task + head :not_found + return + end + @task.destroy + redirect_to tasks_path + + end diff --git a/app/views/tasks/index.html.erb b/app/views/tasks/index.html.erb index 7359fa9ff..701c5ae3d 100644 --- a/app/views/tasks/index.html.erb +++ b/app/views/tasks/index.html.erb @@ -9,6 +9,8 @@
  • <%= task.name %> : <%= task.description %> , <%= task.completion_date%> <%= link_to "Edit", edit_task_path(task.id) %> + <%= link_to "Delete", task_path(task.id), method: :delete, data: {confirm: "are you sure you want to delete this task?"} %> +
  • <% end %> \ No newline at end of file diff --git a/log/development.log b/log/development.log index eebf41e8d..030634e72 100644 --- a/log/development.log +++ b/log/development.log @@ -1550,3 +1550,287 @@ Processing by TasksController#show as HTML Completed 200 OK in 27ms (Views: 23.7ms | ActiveRecord: 0.5ms) +Started GET "/tasks/" for ::1 at 2019-04-11 15:57:19 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.7ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (17.5ms) +Completed 200 OK in 46ms (Views: 33.9ms | ActiveRecord: 8.4ms) + + +Started GET "/tasks/1/edit" for ::1 at 2019-04-11 15:57:22 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"1"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:39 + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (4.2ms) +Completed 200 OK in 41ms (Views: 35.7ms | ActiveRecord: 0.9ms) + + +Started GET "/tasks/20/edit" for ::1 at 2019-04-11 15:57:30 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"20"} + Task Load (1.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 20], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:39 + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (4.0ms) +Completed 500 Internal Server Error in 11ms (ActiveRecord: 1.3ms) + + + +NoMethodError - undefined method `length' for nil:NilClass: + app/views/tasks/index.html.erb:4:in `_app_views_tasks_index_html_erb___2701780339293181440_70225753355640' + app/controllers/tasks_controller.rb:42:in `edit' + +Started POST "/__better_errors/3ff51cf214038976/variables" for ::1 at 2019-04-11 15:57:30 -0700 +Started GET "/tasks/20/edit" for ::1 at 2019-04-11 16:01:20 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"20"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 20], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:39 +Redirected to http://localhost:3000/tasks +Completed 302 Found in 5ms (ActiveRecord: 1.6ms) + + +Started GET "/tasks" for ::1 at 2019-04-11 16:01:20 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (9.4ms) +Completed 200 OK in 24ms (Views: 20.4ms | ActiveRecord: 2.4ms) + + +Started GET "/tasks/60/edit" for ::1 at 2019-04-11 16:01:33 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"60"} + Task Load (1.0ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 60], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:39 +Redirected to http://localhost:3000/tasks +Completed 302 Found in 3ms (ActiveRecord: 1.0ms) + + +Started GET "/tasks" for ::1 at 2019-04-11 16:01:33 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (3.3ms) +Completed 200 OK in 32ms (Views: 29.1ms | ActiveRecord: 0.4ms) + + +Started GET "/tasks" for ::1 at 2019-04-11 20:01:51 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.7ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (15.8ms) +Completed 200 OK in 49ms (Views: 36.3ms | ActiveRecord: 7.5ms) + + +Started GET "/tasks" for ::1 at 2019-04-11 20:01:55 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (3.0ms) +Completed 200 OK in 42ms (Views: 39.8ms | ActiveRecord: 0.4ms) + + +Started GET "/" for ::1 at 2019-04-11 20:02:26 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (4.4ms) +Completed 200 OK in 32ms (Views: 30.3ms | ActiveRecord: 0.4ms) + + +Started GET "/" for ::1 at 2019-04-11 20:02:29 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (3.6ms) +Completed 200 OK in 22ms (Views: 20.4ms | ActiveRecord: 0.4ms) + + +Started GET "/" for ::1 at 2019-04-11 20:03:33 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (9.3ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (14.0ms) +Completed 200 OK in 47ms (Views: 35.8ms | ActiveRecord: 9.3ms) + + +Started GET "/tasks" for ::1 at 2019-04-11 20:03:41 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (2.8ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (7.0ms) +Completed 200 OK in 37ms (Views: 32.0ms | ActiveRecord: 2.8ms) + + +Started GET "/tasks/new" for ::1 at 2019-04-11 20:03:42 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (3.9ms) +Completed 200 OK in 31ms (Views: 27.7ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for ::1 at 2019-04-11 20:03:46 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (5.1ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (8.5ms) +Completed 200 OK in 41ms (Views: 30.7ms | ActiveRecord: 5.1ms) + + +Started GET "/tasks/7/edit" for ::1 at 2019-04-11 20:03:48 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"7"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 7], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:39 + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (3.9ms) +Completed 200 OK in 32ms (Views: 25.0ms | ActiveRecord: 1.5ms) + + +Started PATCH "/tasks/7" for ::1 at 2019-04-11 20:04:32 -0700 +Processing by TasksController#update as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"46ihwX/wCWXzhewKlzZgTdN0UFDpsc18R1G28w8i5CZbVFcRviqtlhfnbm71tWDICArO4WJnNct7K0yFXvu1tA==", "task"=>{"name"=>"Exercise", "description"=>"20 minutes in the morning", "completion_date"=>""}, "commit"=>"Edit it!", "id"=>"7"} + Task Load (1.0ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 7], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:47 +  (0.3ms) BEGIN + ↳ app/controllers/tasks_controller.rb:48 + Task Update (0.7ms) UPDATE "tasks" SET "name" = $1, "description" = $2, "updated_at" = $3 WHERE "tasks"."id" = $4 [["name", "Exercise"], ["description", "20 minutes in the morning"], ["updated_at", "2019-04-12 03:04:32.408000"], ["id", 7]] + ↳ app/controllers/tasks_controller.rb:48 +  (1.1ms) COMMIT + ↳ app/controllers/tasks_controller.rb:48 +Redirected to http://localhost:3000/tasks/7 +Completed 302 Found in 10ms (ActiveRecord: 3.1ms) + + +Started GET "/tasks/7" for ::1 at 2019-04-11 20:04:32 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"7"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 7], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:15 + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.5ms) +Completed 200 OK in 19ms (Views: 16.2ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks" for ::1 at 2019-04-11 20:04:40 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (5.0ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (32.7ms) +Completed 200 OK in 54ms (Views: 47.3ms | ActiveRecord: 5.0ms) + + +Started GET "/" for ::1 at 2019-04-11 20:24:29 -0700 +  (1.9ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC + ↳ /Users/bitaamani/.rvm/gems/ruby-2.6.0/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:98 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.6ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (40.3ms) +Completed 200 OK in 351ms (Views: 333.6ms | ActiveRecord: 6.2ms) + + +Started DELETE "/tasks/8" for ::1 at 2019-04-11 20:24:40 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"authenticity_token"=>"7VdXcdRNfGMVUTHM3bhWep/oMw2+sa3UYv2xVlAmiZCQ8XYnyaicyZ6qch6Ode3awxBTqw80L6J7grkLDytzkA==", "id"=>"8"} + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 8], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:52 +  (0.2ms) BEGIN + ↳ app/controllers/tasks_controller.rb:57 + Task Destroy (0.6ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 8]] + ↳ app/controllers/tasks_controller.rb:57 +  (1.7ms) COMMIT + ↳ app/controllers/tasks_controller.rb:57 +Redirected to http://localhost:3000/tasks +Completed 302 Found in 12ms (ActiveRecord: 3.2ms) + + +Started GET "/tasks" for ::1 at 2019-04-11 20:24:40 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.6ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (3.3ms) +Completed 200 OK in 26ms (Views: 23.6ms | ActiveRecord: 0.6ms) + + +Started GET "/" for ::1 at 2019-04-12 10:42:20 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (4.9ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (23.7ms) +Completed 200 OK in 123ms (Views: 98.7ms | ActiveRecord: 4.9ms) + + +Started GET "/tasks" for ::1 at 2019-04-12 10:42:25 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (9.3ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (16.3ms) +Completed 200 OK in 66ms (Views: 54.5ms | ActiveRecord: 9.3ms) + + +Started GET "/tasks/two" for ::1 at 2019-04-12 10:42:34 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"two"} + Task Load (0.8ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 0], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:15 +Redirected to http://localhost:3000/tasks +Completed 302 Found in 6ms (ActiveRecord: 1.1ms) + + +Started GET "/tasks" for ::1 at 2019-04-12 10:42:34 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (1.1ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (6.0ms) +Completed 200 OK in 42ms (Views: 39.2ms | ActiveRecord: 1.1ms) + + +Started GET "/tasks/five" for ::1 at 2019-04-12 10:42:43 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"five"} + Task Load (1.0ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 0], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:15 +Redirected to http://localhost:3000/tasks +Completed 302 Found in 3ms (ActiveRecord: 1.0ms) + + +Started GET "/tasks" for ::1 at 2019-04-12 10:42:43 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (3.8ms) +Completed 200 OK in 41ms (Views: 38.2ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks/5" for ::1 at 2019-04-12 10:42:50 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"5"} + Task Load (0.7ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 5], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:15 + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.6ms) +Completed 200 OK in 41ms (Views: 34.9ms | ActiveRecord: 0.7ms) + + diff --git a/log/test.log b/log/test.log index fa05113a5..18fb6d3fd 100644 --- a/log/test.log +++ b/log/test.log @@ -2158,3 +2158,1003 @@ Processing by TasksController#new as HTML Rendered tasks/new.html.erb within layouts/application (5.0ms) Completed 200 OK in 7ms (Views: 6.1ms | ActiveRecord: 0.0ms)  (0.2ms) ROLLBACK +  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) BEGIN +  (0.4ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.6ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-11 22:30:38.919773', '2019-04-11 22:30:38.919773'), (298486374, 'MyString', 'MyString', NULL, '2019-04-11 22:30:38.919773', '2019-04-11 22:30:38.919773') +  (0.5ms) COMMIT +  (0.1ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-11 15:30:38 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (39.8ms) +Completed 200 OK in 220ms (Views: 199.6ms | ActiveRecord: 0.0ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-11 15:30:39 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (3.9ms) +Completed 200 OK in 7ms (Views: 5.1ms | ActiveRecord: 0.5ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-11 15:30:39 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (0.9ms) +Completed 200 OK in 3ms (Views: 1.9ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-11 22:30:39.197543"], ["updated_at", "2019-04-11 22:30:39.197543"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190963/edit" for 127.0.0.1 at 2019-04-11 15:30:39 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190963"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (2.2ms) +Completed 200 OK in 10ms (Views: 4.0ms | ActiveRecord: 0.4ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-11 15:30:39 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.3ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-11 22:30:39.223240"], ["updated_at", "2019-04-11 22:30:39.223240"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks/980190964 +Completed 302 Found in 2ms (ActiveRecord: 0.7ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-11 22:30:39.234362"], ["updated_at", "2019-04-11 22:30:39.234362"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190965" for 127.0.0.1 at 2019-04-11 15:30:39 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190965"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.5ms) +Completed 200 OK in 5ms (Views: 2.0ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-11 15:30:39 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.3ms) +  (0.1ms) ROLLBACK +  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) BEGIN +  (0.3ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.6ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-11 22:41:19.852778', '2019-04-11 22:41:19.852778'), (298486374, 'MyString', 'MyString', NULL, '2019-04-11 22:41:19.852778', '2019-04-11 22:41:19.852778') +  (0.8ms) COMMIT +  (0.1ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-11 15:41:19 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (5.6ms) +Completed 200 OK in 136ms (Views: 127.4ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-11 15:41:20 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 4ms (ActiveRecord: 0.6ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.3ms) SAVEPOINT active_record_1 + Task Create (0.5ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-11 22:41:20.020936"], ["updated_at", "2019-04-11 22:41:20.020936"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190963" for 127.0.0.1 at 2019-04-11 15:41:20 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190963"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.4ms) +Completed 200 OK in 3ms (Views: 1.6ms | ActiveRecord: 0.2ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-11 15:41:20 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-11 22:41:20.038402"], ["updated_at", "2019-04-11 22:41:20.038402"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks/980190964 +Completed 302 Found in 2ms (ActiveRecord: 0.6ms) +  (0.2ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-11 22:41:20.045014"], ["updated_at", "2019-04-11 22:41:20.045014"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190965/edit" for 127.0.0.1 at 2019-04-11 15:41:20 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190965"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (1.8ms) +Completed 200 OK in 5ms (Views: 2.9ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-11 15:41:20 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-11 15:41:20 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.5ms) +Completed 200 OK in 4ms (Views: 2.6ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-11 15:41:20 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (0.9ms) +Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.2ms) +  (0.2ms) ROLLBACK +  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.1ms) BEGIN +  (0.4ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.6ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-11 22:45:43.628558', '2019-04-11 22:45:43.628558'), (298486374, 'MyString', 'MyString', NULL, '2019-04-11 22:45:43.628558', '2019-04-11 22:45:43.628558') +  (1.2ms) COMMIT +  (0.2ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-11 15:45:43 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (5.4ms) +Completed 200 OK in 135ms (Views: 125.2ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.5ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-11 22:45:43.805031"], ["updated_at", "2019-04-11 22:45:43.805031"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190963/edit" for 127.0.0.1 at 2019-04-11 15:45:43 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190963"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (1.6ms) +Completed 200 OK in 7ms (Views: 2.9ms | ActiveRecord: 0.6ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-11 15:45:43 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms) +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-11 15:45:43 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.4ms) +Completed 200 OK in 3ms (Views: 2.1ms | ActiveRecord: 0.3ms) +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-11 15:45:43 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (0.9ms) +Completed 200 OK in 2ms (Views: 1.6ms | ActiveRecord: 0.3ms) +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-11 15:45:43 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-11 22:45:43.843007"], ["updated_at", "2019-04-11 22:45:43.843007"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks/980190964 +Completed 302 Found in 2ms (ActiveRecord: 0.6ms) +  (0.2ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-11 22:45:43.849810"], ["updated_at", "2019-04-11 22:45:43.849810"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190965" for 127.0.0.1 at 2019-04-11 15:45:43 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190965"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.4ms) +Completed 200 OK in 4ms (Views: 1.6ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-11 15:45:43 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.2ms) +  (0.2ms) ROLLBACK +  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.3ms) BEGIN +  (0.3ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.5ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-11 22:50:58.533056', '2019-04-11 22:50:58.533056'), (298486374, 'MyString', 'MyString', NULL, '2019-04-11 22:50:58.533056', '2019-04-11 22:50:58.533056') +  (1.3ms) COMMIT +  (0.2ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-11 15:50:58 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.3ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-11 22:50:58.569422"], ["updated_at", "2019-04-11 22:50:58.569422"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks/980190963 +Completed 302 Found in 13ms (ActiveRecord: 0.7ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-11 15:50:58 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (4.3ms) SELECT "tasks".* FROM "tasks" WHERE (300) LIMIT $1 [["LIMIT", 1]] +Completed 500 Internal Server Error in 5ms (ActiveRecord: 4.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-11 22:50:58.587335"], ["updated_at", "2019-04-11 22:50:58.587335"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190964/edit" for 127.0.0.1 at 2019-04-11 15:50:58 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190964"} + Task Load (0.6ms) SELECT "tasks".* FROM "tasks" WHERE (980190964) LIMIT $1 [["LIMIT", 1]] +Completed 500 Internal Server Error in 1ms (ActiveRecord: 0.6ms) +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-11 15:50:58 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.8ms) +Completed 200 OK in 147ms (Views: 145.4ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-11 15:50:58 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.2ms) +Completed 200 OK in 3ms (Views: 2.5ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-11 22:50:58.753081"], ["updated_at", "2019-04-11 22:50:58.753081"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190965" for 127.0.0.1 at 2019-04-11 15:50:58 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190965"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.4ms) +Completed 200 OK in 4ms (Views: 1.5ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-11 15:50:58 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.2ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-11 15:50:58 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (5.1ms) +Completed 200 OK in 7ms (Views: 6.3ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.1ms) BEGIN +  (0.3ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.6ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-11 22:51:53.742703', '2019-04-11 22:51:53.742703'), (298486374, 'MyString', 'MyString', NULL, '2019-04-11 22:51:53.742703', '2019-04-11 22:51:53.742703') +  (1.1ms) COMMIT +  (0.2ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-11 15:51:53 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-11 22:51:53.795330"], ["updated_at", "2019-04-11 22:51:53.795330"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks/980190963 +Completed 302 Found in 8ms (ActiveRecord: 0.7ms) +  (0.4ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.2ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-11 22:51:53.807772"], ["updated_at", "2019-04-11 22:51:53.807772"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190964" for 127.0.0.1 at 2019-04-11 15:51:53 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190964"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190964], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.9ms) +Completed 200 OK in 124ms (Views: 122.1ms | ActiveRecord: 0.2ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-11 15:51:53 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-11 15:51:53 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.8ms) +Completed 200 OK in 5ms (Views: 3.1ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-11 15:51:53 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (0.8ms) +Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.2ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-11 15:51:53 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (5.8ms) +Completed 500 Internal Server Error in 7ms (ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-11 22:51:53.967486"], ["updated_at", "2019-04-11 22:51:53.967486"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190965/edit" for 127.0.0.1 at 2019-04-11 15:51:53 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190965"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (5.4ms) +Completed 200 OK in 9ms (Views: 6.8ms | ActiveRecord: 0.2ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-11 15:51:53 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (1.9ms) +Completed 200 OK in 4ms (Views: 3.3ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.1ms) BEGIN +  (0.3ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.6ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-11 22:54:41.407813', '2019-04-11 22:54:41.407813'), (298486374, 'MyString', 'MyString', NULL, '2019-04-11 22:54:41.407813', '2019-04-11 22:54:41.407813') +  (1.2ms) COMMIT +  (0.2ms) BEGIN +  (0.3ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-11 15:54:41 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (5.5ms) +Completed 200 OK in 162ms (Views: 150.7ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.5ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-11 22:54:41.594768"], ["updated_at", "2019-04-11 22:54:41.594768"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190963" for 127.0.0.1 at 2019-04-11 15:54:41 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190963"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.6ms) +Completed 200 OK in 6ms (Views: 2.1ms | ActiveRecord: 0.6ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-11 15:54:41 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.2ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-11 15:54:41 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.3ms) +Completed 200 OK in 3ms (Views: 2.1ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-11 15:54:41 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (0.8ms) +Completed 200 OK in 2ms (Views: 1.7ms | ActiveRecord: 0.2ms) +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-11 22:54:41.628067"], ["updated_at", "2019-04-11 22:54:41.628067"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190964/edit" for 127.0.0.1 at 2019-04-11 15:54:41 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190964"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190964], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (1.6ms) +Completed 200 OK in 4ms (Views: 2.6ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-11 15:54:41 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (2.8ms) +Completed 500 Internal Server Error in 5ms (ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-11 15:54:41 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-11 22:54:41.652094"], ["updated_at", "2019-04-11 22:54:41.652094"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks/980190965 +Completed 302 Found in 2ms (ActiveRecord: 0.6ms) +  (0.2ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.1ms) BEGIN +  (0.3ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.7ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-11 23:00:44.957941', '2019-04-11 23:00:44.957941'), (298486374, 'MyString', 'MyString', NULL, '2019-04-11 23:00:44.957941', '2019-04-11 23:00:44.957941') +  (1.2ms) COMMIT +  (0.2ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-11 16:00:44 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-11 23:00:44.993089"], ["updated_at", "2019-04-11 23:00:44.993089"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks/980190963 +Completed 302 Found in 14ms (ActiveRecord: 0.7ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-11 16:00:45 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.8ms) +Completed 200 OK in 144ms (Views: 142.7ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-11 16:00:45 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.3ms) +Completed 200 OK in 3ms (Views: 2.5ms | ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-11 16:00:45 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to +Completed 500 Internal Server Error in 8ms (ActiveRecord: 0.2ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-11 23:00:45.172592"], ["updated_at", "2019-04-11 23:00:45.172592"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190964/edit" for 127.0.0.1 at 2019-04-11 16:00:45 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190964"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190964], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (4.9ms) +Completed 200 OK in 7ms (Views: 6.1ms | ActiveRecord: 0.2ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-11 16:00:45 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (1.4ms) +Completed 200 OK in 3ms (Views: 2.5ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-11 23:00:45.197557"], ["updated_at", "2019-04-11 23:00:45.197557"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190965" for 127.0.0.1 at 2019-04-11 16:00:45 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190965"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.4ms) +Completed 200 OK in 3ms (Views: 1.5ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-11 16:00:45 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) BEGIN +  (0.3ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.6ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-11 23:01:13.391306', '2019-04-11 23:01:13.391306'), (298486374, 'MyString', 'MyString', NULL, '2019-04-11 23:01:13.391306', '2019-04-11 23:01:13.391306') +  (1.0ms) COMMIT +  (0.3ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-11 23:01:13.411318"], ["updated_at", "2019-04-11 23:01:13.411318"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190963" for 127.0.0.1 at 2019-04-11 16:01:13 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190963"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (1.0ms) +Completed 200 OK in 151ms (Views: 141.5ms | ActiveRecord: 0.5ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-11 16:01:13 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.3ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-11 16:01:13 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (5.1ms) +Completed 200 OK in 8ms (Views: 6.4ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.2ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-11 23:01:13.589780"], ["updated_at", "2019-04-11 23:01:13.589780"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190964/edit" for 127.0.0.1 at 2019-04-11 16:01:13 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190964"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190964], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (1.6ms) +Completed 200 OK in 4ms (Views: 2.7ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-11 16:01:13 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.2ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-11 16:01:13 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.6ms) +Completed 200 OK in 4ms (Views: 2.5ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-11 16:01:13 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.2ms) +Completed 200 OK in 3ms (Views: 2.4ms | ActiveRecord: 0.3ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.4ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-11 16:01:13 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-11 23:01:13.627028"], ["updated_at", "2019-04-11 23:01:13.627028"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks/980190965 +Completed 302 Found in 2ms (ActiveRecord: 0.6ms) +  (0.2ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK diff --git a/test/controllers/tasks_controller_test.rb b/test/controllers/tasks_controller_test.rb index 50e0db348..06f606c2b 100644 --- a/test/controllers/tasks_controller_test.rb +++ b/test/controllers/tasks_controller_test.rb @@ -92,16 +92,23 @@ # Unskip and complete these tests for Wave 3 describe "edit" do it "can get the edit page for an existing task" do - skip - get edit_task_path + task = Task.create!(name: "read", description: "read somethong") + task_id = task.id + get edit_task_path(task_id) # Assert must_respond_with :success end it "will respond with redirect when attempting to edit a nonexistant task" do - skip - # Your code here + #Arrange + task_id = 300 + #Act + get edit_task_path(task_id) + #Assert + must_respond_with :redirect + must_redirect_to tasks_path + end end @@ -123,11 +130,23 @@ # Complete these tests for Wave 4 describe "destroy" do # Your tests go here - + it "can destroy a model" do + #Arrange + task = Task.new name: "read", description: "Read one book per week" + task.create! + expect { + delete task_path(task.id) + }.must_change 'Task.count', -1 + read =Task.find_by( description: "Read one book per week") + expect(read).must_be_nil + must_respond_with :redirect + must_redirect_to tasks_path + end end # Complete for Wave 4 describe "toggle_complete" do # Your tests go here end + end From f029763bdea3e59fd9ea933c58c31ae5bd767aeb Mon Sep 17 00:00:00 2001 From: Bitaman Date: Fri, 12 Apr 2019 12:15:54 -0700 Subject: [PATCH 10/16] made the routes file dry by usind resources --- config/routes.rb | 19 ++++++++++--------- log/development.log | 46 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 9 deletions(-) diff --git a/config/routes.rb b/config/routes.rb index 2ae6ea827..2d6dd8a20 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,13 +1,14 @@ Rails.application.routes.draw do # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html - root 'tasks#index' - get '/tasks', to: 'tasks#index', as: 'tasks' - get '/tasks/new', to: 'tasks#new', as: 'new_task' - post '/tasks', to: 'tasks#create' + # root 'tasks#index' + # get '/tasks', to: 'tasks#index', as: 'tasks' + # get '/tasks/new', to: 'tasks#new', as: 'new_task' + # post '/tasks', to: 'tasks#create' - # Routes that operate on individual tasks - get '/tasks/:id', to: 'tasks#show', as: 'task' - get '/tasks/:id/edit', to: 'tasks#edit', as: 'edit_task' - patch '/tasks/:id', to: 'tasks#update' - delete '/tasks/:id', to: 'tasks#destroy' + # # Routes that operate on individual tasks + # get '/tasks/:id', to: 'tasks#show', as: 'task' + # get '/tasks/:id/edit', to: 'tasks#edit', as: 'edit_task' + # patch '/tasks/:id', to: 'tasks#update' + # delete '/tasks/:id', to: 'tasks#destroy' + resources :tasks end diff --git a/log/development.log b/log/development.log index 030634e72..e832aca2d 100644 --- a/log/development.log +++ b/log/development.log @@ -1834,3 +1834,49 @@ Processing by TasksController#show as HTML Completed 200 OK in 41ms (Views: 34.9ms | ActiveRecord: 0.7ms) +Started GET "/tasks/5" for ::1 at 2019-04-12 12:14:35 -0700 +  (1.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC + ↳ /Users/bitaamani/.rvm/gems/ruby-2.6.0/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:98 +Processing by TasksController#show as HTML + Parameters: {"id"=>"5"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 5], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:15 + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (1.3ms) +Completed 200 OK in 375ms (Views: 318.5ms | ActiveRecord: 9.6ms) + + +Started GET "/tasks" for ::1 at 2019-04-12 12:14:41 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (6.1ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (10.0ms) +Completed 200 OK in 47ms (Views: 38.4ms | ActiveRecord: 6.1ms) + + +Started GET "/tasks" for ::1 at 2019-04-12 12:14:47 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (5.6ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (8.9ms) +Completed 200 OK in 43ms (Views: 35.4ms | ActiveRecord: 5.6ms) + + +Started GET "/tasks" for ::1 at 2019-04-12 12:14:49 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (4.2ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (8.5ms) +Completed 200 OK in 42ms (Views: 35.3ms | ActiveRecord: 4.2ms) + + +Started GET "/tasks/new" for ::1 at 2019-04-12 12:14:51 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (23.2ms) +Completed 200 OK in 58ms (Views: 54.6ms | ActiveRecord: 0.0ms) + + From 1c1943812c359664dc47e3fd035b6092261dfdb9 Mon Sep 17 00:00:00 2001 From: Bitaman Date: Fri, 12 Apr 2019 12:35:03 -0700 Subject: [PATCH 11/16] made partial form and dryied the new and edit html --- app/views/tasks/_form.html.erb | 20 +++++ app/views/tasks/edit.html.erb | 21 +---- app/views/tasks/new.html.erb | 21 +---- config/routes.rb | 10 --- log/development.log | 145 +++++++++++++++++++++++++++++++++ 5 files changed, 167 insertions(+), 50 deletions(-) create mode 100644 app/views/tasks/_form.html.erb diff --git a/app/views/tasks/_form.html.erb b/app/views/tasks/_form.html.erb new file mode 100644 index 000000000..23669ba78 --- /dev/null +++ b/app/views/tasks/_form.html.erb @@ -0,0 +1,20 @@ +<%= form_with model: @task, class: 'task-form' do |f| %> +

    Please fill out this Task data

    + +
    + <%= f.label :name, "Please enter a task name" %> + <%= f.text_field :name, placeholder: "a task" %> +
    + +
    + <%= f.label :description %> + <%= f.text_field :description, placeholder: "task description" %> +
    + +
    + <%= f.label :completion_date %> + <%= f.text_field :completion_date, placeholder: "task completion date" %> +
    + + <%= f.submit button_text %> +<% end %> \ No newline at end of file diff --git a/app/views/tasks/edit.html.erb b/app/views/tasks/edit.html.erb index 8cf4de7f6..c4ec3e175 100644 --- a/app/views/tasks/edit.html.erb +++ b/app/views/tasks/edit.html.erb @@ -1,23 +1,4 @@

    Edit Task Form

    -<%= form_with model: @task, class: 'task-form' do |f| %> -

    Please fill out this Task data

    +<%= render partial: "form", locals: {button_text: "Edit"} %> -
    - <%= f.label :name, "Please enter a task name" %> - <%= f.text_field :name, placeholder: "a task" %> -
    - -
    - <%= f.label :description %> - <%= f.text_field :description, placeholder: "task description" %> -
    - -
    - <%= f.label :completion_date %> - <%= f.text_field :completion_date, placeholder: "task completion date" %> -
    - - <%= f.submit "Edit it!" %> - -<% end %> \ No newline at end of file diff --git a/app/views/tasks/new.html.erb b/app/views/tasks/new.html.erb index 0b8b8fd42..c00c6e0ad 100644 --- a/app/views/tasks/new.html.erb +++ b/app/views/tasks/new.html.erb @@ -1,23 +1,4 @@

    New Task Form

    -<%= form_with model: @task, class: 'task-form' do |f| %> -

    Please fill out this Task data

    +<%= render partial: "form", locals: { button_text: "New"} %> -
    - <%= f.label :name, "Please enter a task name" %> - <%= f.text_field :name, placeholder: "a task" %> -
    - -
    - <%= f.label :description %> - <%= f.text_field :description, placeholder: "task description" %> -
    - -
    - <%= f.label :completion_date %> - <%= f.text_field :completion_date, placeholder: "task completion date" %> -
    - - <%= f.submit "Save it!" %> - -<% end %> \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index 2d6dd8a20..2a9234a0a 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,14 +1,4 @@ Rails.application.routes.draw do # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html - # root 'tasks#index' - # get '/tasks', to: 'tasks#index', as: 'tasks' - # get '/tasks/new', to: 'tasks#new', as: 'new_task' - # post '/tasks', to: 'tasks#create' - - # # Routes that operate on individual tasks - # get '/tasks/:id', to: 'tasks#show', as: 'task' - # get '/tasks/:id/edit', to: 'tasks#edit', as: 'edit_task' - # patch '/tasks/:id', to: 'tasks#update' - # delete '/tasks/:id', to: 'tasks#destroy' resources :tasks end diff --git a/log/development.log b/log/development.log index e832aca2d..70b8fd870 100644 --- a/log/development.log +++ b/log/development.log @@ -1880,3 +1880,148 @@ Processing by TasksController#new as HTML Completed 200 OK in 58ms (Views: 54.6ms | ActiveRecord: 0.0ms) +Started GET "/tasks/new" for ::1 at 2019-04-12 12:20:22 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (1.4ms) +Completed 500 Internal Server Error in 7ms (ActiveRecord: 0.0ms) + + + +SyntaxError - syntax error, unexpected ensure, expecting end-of-input + ensure + ^~~~~~: + app/views/tasks/new.html.erb:7:in `' + +Started POST "/__better_errors/b85237437c6a05d8/variables" for ::1 at 2019-04-12 12:20:22 -0700 +Started GET "/tasks/new" for ::1 at 2019-04-12 12:20:51 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (1.6ms) + Rendered tasks/new.html.erb within layouts/application (3.4ms) +Completed 500 Internal Server Error in 8ms (ActiveRecord: 0.0ms) + + + +SyntaxError - syntax error, unexpected end-of-input, expecting end: + app/views/tasks/_form.html.erb:23:in `' + app/views/tasks/new.html.erb:3:in `_app_views_tasks_new_html_erb___1531304003490826607_70114335807620' + +Started POST "/__better_errors/c3abdc1feedd8b1b/variables" for ::1 at 2019-04-12 12:20:51 -0700 +Started GET "/tasks/new" for ::1 at 2019-04-12 12:26:36 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (0.8ms) + Rendered tasks/new.html.erb within layouts/application (1.9ms) +Completed 500 Internal Server Error in 6ms (ActiveRecord: 0.0ms) + + + +SyntaxError - syntax error, unexpected end-of-input, expecting end: + app/views/tasks/_form.html.erb:23:in `' + app/views/tasks/new.html.erb:3:in `_app_views_tasks_new_html_erb___1531304003490826607_70114300517520' + +Started POST "/__better_errors/41e2407b152815a1/variables" for ::1 at 2019-04-12 12:26:36 -0700 +Started GET "/tasks/new" for ::1 at 2019-04-12 12:27:12 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (1.5ms) + Rendered tasks/new.html.erb within layouts/application (2.8ms) +Completed 500 Internal Server Error in 7ms (ActiveRecord: 0.0ms) + + + +SyntaxError - syntax error, unexpected end-of-input, expecting end: + app/views/tasks/_form.html.erb:23:in `' + app/views/tasks/new.html.erb:3:in `_app_views_tasks_new_html_erb___1531304003490826607_70114300269300' + +Started POST "/__better_errors/5a2a660d4cf76741/variables" for ::1 at 2019-04-12 12:27:12 -0700 +Started GET "/tasks/new" for ::1 at 2019-04-12 12:28:25 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (1.0ms) + Rendered tasks/new.html.erb within layouts/application (2.5ms) +Completed 500 Internal Server Error in 7ms (ActiveRecord: 0.0ms) + + + +SyntaxError - syntax error, unexpected end +...eze;@output_buffer.append=( end ); +... ^~~ +/Users/bitaamani/Documents/homework/projects/ruby-projects/TaskList/app/views/tasks/_form.html.erb:22: syntax error, unexpected ensure, expecting ')' + ensure + ^~~~~~ +/Users/bitaamani/Documents/homework/projects/ruby-projects/TaskList/app/views/tasks/_form.html.erb:24: syntax error, unexpected end, expecting ')' + end + ^~~: + app/views/tasks/_form.html.erb:20:in `' + app/views/tasks/new.html.erb:3:in `_app_views_tasks_new_html_erb___1531304003490826607_70114310743460' + +Started POST "/__better_errors/47e27e3bdbd043d5/variables" for ::1 at 2019-04-12 12:28:25 -0700 +Started GET "/tasks/new" for ::1 at 2019-04-12 12:28:35 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (496.4ms) + Rendered tasks/new.html.erb within layouts/application (498.3ms) +Completed 500 Internal Server Error in 503ms (ActiveRecord: 0.0ms) + + + +NameError - undefined local variable or method `button_text' for #<#:0x00007f8984c4c3d0> +Did you mean? button_to + button_tag: + app/views/tasks/_form.html.erb:19:in `block in _app_views_tasks__form_html_erb___2973131436645374002_70114307387380' + app/views/tasks/_form.html.erb:1:in `_app_views_tasks__form_html_erb___2973131436645374002_70114307387380' + app/views/tasks/new.html.erb:3:in `_app_views_tasks_new_html_erb___1531304003490826607_70114307368940' + +Started POST "/__better_errors/adc2fbb915d57be9/variables" for ::1 at 2019-04-12 12:28:36 -0700 +Started GET "/tasks/new" for ::1 at 2019-04-12 12:29:36 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (516.2ms) + Rendered tasks/new.html.erb within layouts/application (517.5ms) +Completed 500 Internal Server Error in 521ms (ActiveRecord: 0.0ms) + + + +NameError - undefined local variable or method `button_text' for #<#:0x00007f8984b35f28> +Did you mean? button_to + button_tag: + app/views/tasks/_form.html.erb:19:in `block in _app_views_tasks__form_html_erb___2973131436645374002_70114300017380' + app/views/tasks/_form.html.erb:1:in `_app_views_tasks__form_html_erb___2973131436645374002_70114300017380' + app/views/tasks/new.html.erb:3:in `_app_views_tasks_new_html_erb___1531304003490826607_70114306800140' + +Started POST "/__better_errors/d661aa8e5207c88c/variables" for ::1 at 2019-04-12 12:29:37 -0700 +Started GET "/tasks/new" for ::1 at 2019-04-12 12:29:49 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (1.5ms) + Rendered tasks/new.html.erb within layouts/application (2.9ms) +Completed 500 Internal Server Error in 8ms (ActiveRecord: 0.0ms) + + + +SyntaxError - syntax error, unexpected ')', expecting '=' +...ppend=( f.submit, button_text );@output_buffer.safe_append=' +... ^ +/Users/bitaamani/Documents/homework/projects/ruby-projects/TaskList/app/views/tasks/_form.html.erb:20: syntax error, unexpected end, expecting ')' +'.freeze; end ; + ^~~ +/Users/bitaamani/Documents/homework/projects/ruby-projects/TaskList/app/views/tasks/_form.html.erb:22: syntax error, unexpected ensure, expecting ')' + ensure + ^~~~~~ +/Users/bitaamani/Documents/homework/projects/ruby-projects/TaskList/app/views/tasks/_form.html.erb:24: syntax error, unexpected end, expecting ')' + end + ^~~: + app/views/tasks/_form.html.erb:19:in `' + app/views/tasks/new.html.erb:3:in `_app_views_tasks_new_html_erb___1531304003490826607_70114324376120' + +Started POST "/__better_errors/5f7a5250ea62c3c0/variables" for ::1 at 2019-04-12 12:29:49 -0700 +Started GET "/tasks/new" for ::1 at 2019-04-12 12:33:51 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (2.4ms) + Rendered tasks/new.html.erb within layouts/application (3.8ms) +Completed 200 OK in 40ms (Views: 24.1ms | ActiveRecord: 7.5ms) + + From e2240c9f7619db49a9c4a4808a40a8881e40582c Mon Sep 17 00:00:00 2001 From: Bitaman Date: Fri, 12 Apr 2019 15:31:14 -0700 Subject: [PATCH 12/16] finished writing tests for update method, all tests are passing --- app/controllers/tasks_controller.rb | 92 +- app/views/tasks/index.html.erb | 2 +- config/routes.rb | 1 + log/development.log | 205 + log/test.log | 6189 +++++++++++++++++++++ test/controllers/tasks_controller_test.rb | 56 +- 6 files changed, 6479 insertions(+), 66 deletions(-) diff --git a/app/controllers/tasks_controller.rb b/app/controllers/tasks_controller.rb index 16d9f5d72..ec7fbb53c 100644 --- a/app/controllers/tasks_controller.rb +++ b/app/controllers/tasks_controller.rb @@ -1,65 +1,67 @@ - class TasksController < ApplicationController + def index + @tasks = Task.all + end - def index - @tasks = Task.all - - end - - def show + def show task_id = params[:id] puts "Task ID was #{task_id}" puts "result of .to_i: #{task_id.to_i}" @task = Task.find_by(id: task_id) unless @task - #head :not_found - redirect_to tasks_path - end + #head :not_found + redirect_to tasks_path end - def new - @task = Task.new - - end - def create - @task = Task.new - unless params["task"] - render :new, status: :bad_request - return - end + end - @task.name = params["task"]["name"] - @task.description = params["task"]["description"] - @task.save - redirect_to task_path(@task.id) - end - def edit - @task = Task.find_by(id: params[:id]) - unless @task - - redirect_to tasks_path - end + def new + @task = Task.new + end + def create + @task = Task.new + unless params["task"] + render :new, status: :bad_request + return end - def update - @task = Task.find(params[:id]) - @task.update(name: params["task"]["name"], description: params["task"]["description"], completion_date: params["task"]["completion_date"]) - redirect_to task_path + + @task.name = params["task"]["name"] + @task.description = params["task"]["description"] + @task.save + redirect_to tasks_path + end + + def edit + @task = Task.find_by(id: params[:id]) + unless @task + redirect_to tasks_path end - def destroy - @task = Task.find_by(id: params[:id]) - unless @task - head :not_found - return - end - @task.destroy - redirect_to tasks_path - + end + + def update + @task = Task.find_by(id: params[:id]) + unless @task + redirect_to tasks_path + return end - + @task.update(name: params["task"]["name"], description: params["task"]["description"], completion_date: params["task"]["completion_date"]) + redirect_to task_path + end + def destroy + @task = Task.find_by(id: params[:id]) + unless @task + head :not_found + return + end + @task.destroy + redirect_to tasks_path + end + def toggle_complete + end end diff --git a/app/views/tasks/index.html.erb b/app/views/tasks/index.html.erb index 701c5ae3d..2f79da460 100644 --- a/app/views/tasks/index.html.erb +++ b/app/views/tasks/index.html.erb @@ -7,7 +7,7 @@
      <% @tasks.each do |task|%>
    • -<%= task.name %> : <%= task.description %> , <%= task.completion_date%> +<%= link_to task.name, task_path(task) %> : <%= task.description %> , <%= task.completion_date%> <%= link_to "Edit", edit_task_path(task.id) %> <%= link_to "Delete", task_path(task.id), method: :delete, data: {confirm: "are you sure you want to delete this task?"} %> diff --git a/config/routes.rb b/config/routes.rb index 2a9234a0a..756aa3675 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,4 +1,5 @@ Rails.application.routes.draw do # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html + root "tasks#index" resources :tasks end diff --git a/log/development.log b/log/development.log index 70b8fd870..787d839fb 100644 --- a/log/development.log +++ b/log/development.log @@ -2025,3 +2025,208 @@ Processing by TasksController#new as HTML Completed 200 OK in 40ms (Views: 24.1ms | ActiveRecord: 7.5ms) +Started GET "/tasks" for ::1 at 2019-04-12 14:01:27 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.8ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (4.1ms) +Completed 200 OK in 33ms (Views: 30.7ms | ActiveRecord: 0.8ms) + + +Started GET "/tasks" for ::1 at 2019-04-12 14:05:19 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (3.8ms) +Completed 200 OK in 64ms (Views: 62.1ms | ActiveRecord: 0.4ms) + + +Started GET "/tasks/1" for ::1 at 2019-04-12 14:05:22 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"1"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:15 + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.8ms) +Completed 200 OK in 39ms (Views: 31.3ms | ActiveRecord: 3.0ms) + + +Started GET "/tasks/new" for ::1 at 2019-04-12 14:05:45 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (4.0ms) + Rendered tasks/new.html.erb within layouts/application (6.3ms) +Completed 200 OK in 42ms (Views: 36.9ms | ActiveRecord: 0.0ms) + + +Started POST "/tasks" for ::1 at 2019-04-12 14:06:04 -0700 +Processing by TasksController#create as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"iZag0/HHkLEFfEsJzkAT726Ik6Lf2Z5afeAFLG1h9/ejXNB32M2gbkfDDFou/3zaTQsTWdsNpWqYAQyWav5ZHA==", "task"=>{"name"=>"Art", "description"=>"pain a picture", "completion_date"=>"2018-02-05"}, "commit"=>"New"} +  (10.0ms) BEGIN + ↳ app/controllers/tasks_controller.rb:35 + Task Create (10.1ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Art"], ["description", "pain a picture"], ["created_at", "2019-04-12 21:06:04.725944"], ["updated_at", "2019-04-12 21:06:04.725944"]] + ↳ app/controllers/tasks_controller.rb:35 +  (1.7ms) COMMIT + ↳ app/controllers/tasks_controller.rb:35 +Redirected to http://localhost:3000/tasks/9 +Completed 302 Found in 26ms (ActiveRecord: 21.8ms) + + +Started GET "/tasks/9" for ::1 at 2019-04-12 14:06:04 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"9"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 9], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:15 + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.4ms) +Completed 200 OK in 20ms (Views: 17.9ms | ActiveRecord: 0.4ms) + + +Started GET "/tasks" for ::1 at 2019-04-12 14:06:13 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (4.0ms) +Completed 200 OK in 32ms (Views: 30.3ms | ActiveRecord: 0.4ms) + + +Started GET "/tasks" for ::1 at 2019-04-12 14:12:05 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.7ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (23.0ms) +Completed 200 OK in 48ms (Views: 35.0ms | ActiveRecord: 7.3ms) + + +Started GET "/tasks/new" for ::1 at 2019-04-12 14:12:07 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (4.4ms) + Rendered tasks/new.html.erb within layouts/application (6.5ms) +Completed 200 OK in 42ms (Views: 38.3ms | ActiveRecord: 0.0ms) + + +Started POST "/tasks" for ::1 at 2019-04-12 14:12:28 -0700 +Processing by TasksController#create as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"/zM8sdmWhnTzYPI9K8CHSQJ47YrOUEHUwBr0HABQKurV+UwV8Jy2q7HftW7Lf+h8IfttccqEeuQl+/2mB8+EAQ==", "task"=>{"name"=>"Drink", "description"=>"8 glasses of water per day", "completion_date"=>"2018-02-03"}, "commit"=>"New"} +  (0.2ms) BEGIN + ↳ app/controllers/tasks_controller.rb:35 + Task Create (0.9ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Drink"], ["description", "8 glasses of water per day"], ["created_at", "2019-04-12 21:12:28.558206"], ["updated_at", "2019-04-12 21:12:28.558206"]] + ↳ app/controllers/tasks_controller.rb:35 +  (1.5ms) COMMIT + ↳ app/controllers/tasks_controller.rb:35 +Redirected to http://localhost:3000/tasks +Completed 302 Found in 7ms (ActiveRecord: 2.6ms) + + +Started GET "/tasks" for ::1 at 2019-04-12 14:12:28 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (6.2ms) +Completed 200 OK in 33ms (Views: 31.2ms | ActiveRecord: 0.5ms) + + +Started GET "/tasks/3/edit" for ::1 at 2019-04-12 14:13:21 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"3"} + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 3], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:39 + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (4.7ms) + Rendered tasks/edit.html.erb within layouts/application (6.4ms) +Completed 200 OK in 65ms (Views: 57.9ms | ActiveRecord: 2.3ms) + + +Started PATCH "/tasks/3" for ::1 at 2019-04-12 14:13:29 -0700 +Processing by TasksController#update as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"4r8yE8CrI75VYW8WxmM8qSlGdq3UZuS5rZurlSFwDS22/ZeNzeTnXJSaWoCNNcwwN/t9hRop51D4WvvWDOC+9g==", "task"=>{"name"=>"clay", "description"=>"google how to do this", "completion_date"=>""}, "commit"=>"Edit", "id"=>"3"} + Task Load (4.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 3], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:47 +  (0.3ms) BEGIN + ↳ app/controllers/tasks_controller.rb:48 + Task Update (3.1ms) UPDATE "tasks" SET "description" = $1, "updated_at" = $2 WHERE "tasks"."id" = $3 [["description", "google how to do this"], ["updated_at", "2019-04-12 21:13:29.814113"], ["id", 3]] + ↳ app/controllers/tasks_controller.rb:48 +  (0.6ms) COMMIT + ↳ app/controllers/tasks_controller.rb:48 +Redirected to http://localhost:3000/tasks/3 +Completed 302 Found in 14ms (ActiveRecord: 8.4ms) + + +Started GET "/tasks/3" for ::1 at 2019-04-12 14:13:29 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"3"} + Task Load (0.6ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 3], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:15 + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.4ms) +Completed 200 OK in 20ms (Views: 17.0ms | ActiveRecord: 0.6ms) + + +Started GET "/tasks" for ::1 at 2019-04-12 14:18:00 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (4.4ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (9.1ms) +Completed 200 OK in 37ms (Views: 29.6ms | ActiveRecord: 4.4ms) + + +Started DELETE "/tasks/1" for ::1 at 2019-04-12 14:18:05 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"authenticity_token"=>"oiQRj4C/rVu50kr66R4ljkI8AF8s70bSLc7pbzv5Gt3fgjDZnVpN8TIpCSi6054uHsRg+Z1qxKQ0seEyZPTg3Q==", "id"=>"1"} + Task Load (0.7ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:52 +  (0.2ms) BEGIN + ↳ app/controllers/tasks_controller.rb:57 + Task Destroy (0.5ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 1]] + ↳ app/controllers/tasks_controller.rb:57 +  (0.5ms) COMMIT + ↳ app/controllers/tasks_controller.rb:57 +Redirected to http://localhost:3000/tasks +Completed 302 Found in 6ms (ActiveRecord: 1.9ms) + + +Started GET "/tasks" for ::1 at 2019-04-12 14:18:05 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (4.3ms) +Completed 200 OK in 29ms (Views: 27.1ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks/6/edit" for ::1 at 2019-04-12 15:00:06 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"6"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 6], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:39 + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (2.0ms) + Rendered tasks/edit.html.erb within layouts/application (2.9ms) +Completed 200 OK in 43ms (Views: 27.7ms | ActiveRecord: 6.5ms) + + +Started GET "/tasks/45/edit" for ::1 at 2019-04-12 15:00:13 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"45"} + Task Load (0.9ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 45], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:39 +Redirected to http://localhost:3000/tasks +Completed 302 Found in 3ms (ActiveRecord: 0.9ms) + + +Started GET "/tasks" for ::1 at 2019-04-12 15:00:13 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (3.9ms) +Completed 200 OK in 28ms (Views: 26.1ms | ActiveRecord: 0.5ms) + + diff --git a/log/test.log b/log/test.log index 18fb6d3fd..696f258aa 100644 --- a/log/test.log +++ b/log/test.log @@ -3158,3 +3158,6192 @@ Completed 302 Found in 2ms (ActiveRecord: 0.6ms)  (0.2ms) SELECT COUNT(*) FROM "tasks" Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]]  (0.2ms) ROLLBACK +  (2.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) BEGIN +  (5.9ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.2ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (1.9ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-12 21:26:43.323350', '2019-04-12 21:26:43.323350'), (298486374, 'MyString', 'MyString', NULL, '2019-04-12 21:26:43.323350', '2019-04-12 21:26:43.323350') +  (0.6ms) COMMIT +  (0.1ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-12 14:26:43 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (13.4ms) +Completed 200 OK in 190ms (Views: 181.5ms | ActiveRecord: 0.5ms) +  (0.4ms) ROLLBACK +  (0.2ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.5ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-12 21:26:43.621006"], ["updated_at", "2019-04-12 21:26:43.621006"]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190963/edit" for 127.0.0.1 at 2019-04-12 14:26:43 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190963"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (14.3ms) + Rendered tasks/edit.html.erb within layouts/application (16.3ms) +Completed 200 OK in 25ms (Views: 17.7ms | ActiveRecord: 0.7ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-12 14:26:43 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (1.0ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 1.0ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-12 21:26:43.663501"], ["updated_at", "2019-04-12 21:26:43.663501"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190964" for 127.0.0.1 at 2019-04-12 14:26:43 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190964"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190964], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.9ms) +Completed 200 OK in 7ms (Views: 4.2ms | ActiveRecord: 0.4ms) +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-12 14:26:43 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.4ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-12 14:26:43 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.3ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-12 21:26:43.693075"], ["updated_at", "2019-04-12 21:26:43.693075"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 0.9ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (1.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.2ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-12 14:26:43 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (1.7ms) + Rendered tasks/new.html.erb within layouts/application (2.4ms) +Completed 200 OK in 7ms (Views: 4.7ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) BEGIN +  (1.6ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.6ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-12 21:27:12.757920', '2019-04-12 21:27:12.757920'), (298486374, 'MyString', 'MyString', NULL, '2019-04-12 21:27:12.757920', '2019-04-12 21:27:12.757920') +  (1.0ms) COMMIT +  (0.2ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-12 14:27:12 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (22.1ms) +Completed 200 OK in 186ms (Views: 177.8ms | ActiveRecord: 0.5ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.2ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-12 14:27:13 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (5.9ms) + Rendered tasks/new.html.erb within layouts/application (6.9ms) +Completed 200 OK in 9ms (Views: 8.1ms | ActiveRecord: 0.0ms) +  (0.9ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-12 21:27:13.104206"], ["updated_at", "2019-04-12 21:27:13.104206"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190963/edit" for 127.0.0.1 at 2019-04-12 14:27:13 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190963"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (1.2ms) + Rendered tasks/edit.html.erb within layouts/application (1.7ms) +Completed 200 OK in 6ms (Views: 2.8ms | ActiveRecord: 0.6ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-12 14:27:13 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.2ms) +  (0.2ms) ROLLBACK +  (0.9ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-12 21:27:13.127721"], ["updated_at", "2019-04-12 21:27:13.127721"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190964" for 127.0.0.1 at 2019-04-12 14:27:13 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190964"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190964], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.4ms) +Completed 200 OK in 3ms (Views: 1.6ms | ActiveRecord: 0.2ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-12 14:27:13 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.7ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 0.7ms) +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.4ms) ROLLBACK +  (0.3ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.7ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-12 14:27:13 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-12 21:27:13.161909"], ["updated_at", "2019-04-12 21:27:13.161909"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 0.7ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) BEGIN +  (0.4ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.2ms) BEGIN + Fixtures Load (0.7ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-12 21:29:13.642991', '2019-04-12 21:29:13.642991'), (298486374, 'MyString', 'MyString', NULL, '2019-04-12 21:29:13.642991', '2019-04-12 21:29:13.642991') +  (0.5ms) COMMIT +  (0.2ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-12 14:29:13 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (13.4ms) + Rendered tasks/new.html.erb within layouts/application (15.9ms) +Completed 200 OK in 182ms (Views: 171.1ms | ActiveRecord: 0.0ms) +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.6ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-12 21:29:13.878548"], ["updated_at", "2019-04-12 21:29:13.878548"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190963/edit" for 127.0.0.1 at 2019-04-12 14:29:13 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190963"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (2.2ms) + Rendered tasks/edit.html.erb within layouts/application (2.9ms) +Completed 200 OK in 12ms (Views: 5.5ms | ActiveRecord: 0.6ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-12 14:29:13 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-12 21:29:13.904984"], ["updated_at", "2019-04-12 21:29:13.904984"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190964" for 127.0.0.1 at 2019-04-12 14:29:13 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190964"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190964], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.7ms) +Completed 200 OK in 5ms (Views: 2.7ms | ActiveRecord: 0.4ms) +  (0.3ms) ROLLBACK +  (0.4ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-12 14:29:13 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.6ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.6ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.5ms) SELECT COUNT(*) FROM "tasks" +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.3ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-12 14:29:13 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.1ms) +Completed 200 OK in 5ms (Views: 3.5ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-12 14:29:14 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-12 21:29:14.072405"], ["updated_at", "2019-04-12 21:29:14.072405"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.7ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.3ms) ROLLBACK +  (0.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.3ms) BEGIN +  (0.7ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.7ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-12 21:31:20.489466', '2019-04-12 21:31:20.489466'), (298486374, 'MyString', 'MyString', NULL, '2019-04-12 21:31:20.489466', '2019-04-12 21:31:20.489466') +  (0.5ms) COMMIT +  (0.1ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.7ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-12 21:31:20.522753"], ["updated_at", "2019-04-12 21:31:20.522753"]] +  (0.4ms) RELEASE SAVEPOINT active_record_1 + Task Destroy (7.9ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190963]] +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190963" for 127.0.0.1 at 2019-04-12 14:31:20 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190963"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] +Completed 404 Not Found in 9ms (ActiveRecord: 0.6ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (1.2ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-12 14:31:20 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (28.3ms) + Rendered tasks/new.html.erb within layouts/application (32.3ms) +Completed 200 OK in 310ms (Views: 307.4ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-12 21:31:20.904594"], ["updated_at", "2019-04-12 21:31:20.904594"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190964" for 127.0.0.1 at 2019-04-12 14:31:20 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190964"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190964], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.5ms) +Completed 200 OK in 7ms (Views: 2.2ms | ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-12 14:31:20 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-12 14:31:20 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.7ms) +Completed 200 OK in 6ms (Views: 4.2ms | ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-12 21:31:21.045746"], ["updated_at", "2019-04-12 21:31:21.045746"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190965/edit" for 127.0.0.1 at 2019-04-12 14:31:21 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190965"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (1.5ms) + Rendered tasks/edit.html.erb within layouts/application (2.2ms) +Completed 200 OK in 7ms (Views: 3.6ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-12 14:31:21 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.5ms) +  (0.2ms) ROLLBACK +  (0.5ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-12 14:31:21 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-12 21:31:21.069284"], ["updated_at", "2019-04-12 21:31:21.069284"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.6ms) +  (0.2ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.3ms) ROLLBACK +  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) BEGIN +  (0.3ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.6ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-12 21:31:41.910274', '2019-04-12 21:31:41.910274'), (298486374, 'MyString', 'MyString', NULL, '2019-04-12 21:31:41.910274', '2019-04-12 21:31:41.910274') +  (1.0ms) COMMIT +  (0.2ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.2ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-12 14:31:41 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 12ms (ActiveRecord: 0.6ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.5ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-12 21:31:41.982726"], ["updated_at", "2019-04-12 21:31:41.982726"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190963/edit" for 127.0.0.1 at 2019-04-12 14:31:41 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190963"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (7.2ms) + Rendered tasks/edit.html.erb within layouts/application (8.7ms) +Completed 200 OK in 159ms (Views: 154.4ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-12 14:31:42 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.7ms) +Completed 200 OK in 4ms (Views: 2.6ms | ActiveRecord: 0.3ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-12 14:31:42 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (1.1ms) + Rendered tasks/new.html.erb within layouts/application (2.2ms) +Completed 200 OK in 7ms (Views: 4.6ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-12 21:31:42.270771"], ["updated_at", "2019-04-12 21:31:42.270771"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190964" for 127.0.0.1 at 2019-04-12 14:31:42 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190964"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190964], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.4ms) +Completed 200 OK in 4ms (Views: 1.9ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-12 14:31:42 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.8ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-12 14:31:42 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-12 21:31:42.303759"], ["updated_at", "2019-04-12 21:31:42.303759"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.6ms) +  (0.2ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.4ms) ROLLBACK +  (0.3ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-12 21:31:42.312850"], ["updated_at", "2019-04-12 21:31:42.312850"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + Task Destroy (0.7ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190966]] +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190966" for 127.0.0.1 at 2019-04-12 14:31:42 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190966"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190966], ["LIMIT", 1]] +Completed 404 Not Found in 1ms (ActiveRecord: 0.4ms) +  (0.4ms) SELECT COUNT(*) FROM "tasks" +  (0.2ms) ROLLBACK +  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.3ms) BEGIN +  (0.5ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.2ms) COMMIT +  (0.4ms) BEGIN + Fixtures Load (0.8ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-12 21:32:25.337157', '2019-04-12 21:32:25.337157'), (298486374, 'MyString', 'MyString', NULL, '2019-04-12 21:32:25.337157', '2019-04-12 21:32:25.337157') +  (0.8ms) COMMIT +  (0.1ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-12 14:32:25 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (5.1ms) + Rendered tasks/new.html.erb within layouts/application (6.4ms) +Completed 200 OK in 142ms (Views: 129.8ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.4ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-12 14:32:25 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-12 21:32:25.518568"], ["updated_at", "2019-04-12 21:32:25.518568"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 4ms (ActiveRecord: 0.9ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.4ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-12 21:32:25.531487"], ["updated_at", "2019-04-12 21:32:25.531487"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Task Destroy (0.3ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190964]] +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190964" for 127.0.0.1 at 2019-04-12 14:32:25 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190964"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190964], ["LIMIT", 1]] +Completed 404 Not Found in 2ms (ActiveRecord: 0.3ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.6ms) ROLLBACK +  (0.2ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-12 14:32:25 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.9ms) +Completed 200 OK in 4ms (Views: 3.2ms | ActiveRecord: 0.3ms) +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-12 21:32:25.658690"], ["updated_at", "2019-04-12 21:32:25.658690"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190965/edit" for 127.0.0.1 at 2019-04-12 14:32:25 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190965"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (1.2ms) + Rendered tasks/edit.html.erb within layouts/application (1.8ms) +Completed 200 OK in 5ms (Views: 2.9ms | ActiveRecord: 0.3ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-12 14:32:25 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.8ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 0.8ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-12 14:32:25 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-12 21:32:25.680355"], ["updated_at", "2019-04-12 21:32:25.680355"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190966" for 127.0.0.1 at 2019-04-12 14:32:25 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190966"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190966], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.4ms) +Completed 200 OK in 3ms (Views: 1.7ms | ActiveRecord: 0.2ms) +  (0.2ms) ROLLBACK +  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) BEGIN +  (0.5ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.7ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-12 21:33:05.309032', '2019-04-12 21:33:05.309032'), (298486374, 'MyString', 'MyString', NULL, '2019-04-12 21:33:05.309032', '2019-04-12 21:33:05.309032') +  (1.1ms) COMMIT +  (0.2ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.2ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-12 21:33:05.331937"], ["updated_at", "2019-04-12 21:33:05.331937"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190963" for 127.0.0.1 at 2019-04-12 14:33:05 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190963"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.8ms) +Completed 200 OK in 162ms (Views: 151.8ms | ActiveRecord: 0.5ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-12 14:33:05 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-12 21:33:05.513777"], ["updated_at", "2019-04-12 21:33:05.513777"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + Task Destroy (0.3ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190964]] +  (0.4ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190964" for 127.0.0.1 at 2019-04-12 14:33:05 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190964"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190964], ["LIMIT", 1]] +Completed 404 Not Found in 2ms (ActiveRecord: 0.4ms) +  (0.9ms) SELECT COUNT(*) FROM "tasks" +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-12 21:33:05.531698"], ["updated_at", "2019-04-12 21:33:05.531698"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190965/edit" for 127.0.0.1 at 2019-04-12 14:33:05 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190965"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (10.5ms) + Rendered tasks/edit.html.erb within layouts/application (12.4ms) +Completed 200 OK in 16ms (Views: 14.3ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-12 14:33:05 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.6ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.6ms) +  (0.6ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-12 14:33:05 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-12 21:33:05.568253"], ["updated_at", "2019-04-12 21:33:05.568253"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.7ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-12 14:33:05 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (1.4ms) + Rendered tasks/new.html.erb within layouts/application (2.4ms) +Completed 200 OK in 5ms (Views: 3.9ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.3ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.7ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-12 14:33:05 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.8ms) +Completed 200 OK in 5ms (Views: 3.2ms | ActiveRecord: 0.3ms) +  (0.4ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +  (0.4ms) ROLLBACK +  (0.2ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.1ms) ROLLBACK +  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.3ms) BEGIN +  (0.4ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.8ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-12 21:33:28.843888', '2019-04-12 21:33:28.843888'), (298486374, 'MyString', 'MyString', NULL, '2019-04-12 21:33:28.843888', '2019-04-12 21:33:28.843888') +  (0.8ms) COMMIT +  (0.1ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-12 21:33:28.882478"], ["updated_at", "2019-04-12 21:33:28.882478"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190963" for 127.0.0.1 at 2019-04-12 14:33:28 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190963"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.9ms) +Completed 200 OK in 142ms (Views: 131.7ms | ActiveRecord: 0.5ms) +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-12 14:33:29 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.6ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-12 14:33:29 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.3ms) SAVEPOINT active_record_1 + Task Create (0.5ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-12 21:33:29.071759"], ["updated_at", "2019-04-12 21:33:29.071759"]] +  (0.5ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 4ms (ActiveRecord: 1.2ms) +  (0.4ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "making a new one"], ["created_at", "2019-04-12 21:33:29.082785"], ["updated_at", "2019-04-12 21:33:29.082785"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + Task Update (0.3ms) UPDATE "tasks" SET "name" = $1, "updated_at" = $2 WHERE "tasks"."id" = $3 [["name", "not new anymore"], ["updated_at", "2019-04-12 21:33:29.084166"], ["id", 980190965]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-12 21:33:29.088362"], ["updated_at", "2019-04-12 21:33:29.088362"]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 + Task Destroy (0.7ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190966]] +  (0.8ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190966" for 127.0.0.1 at 2019-04-12 14:33:29 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190966"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190966], ["LIMIT", 1]] +Completed 404 Not Found in 1ms (ActiveRecord: 0.4ms) +  (2.6ms) SELECT COUNT(*) FROM "tasks" +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-12 14:33:29 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.6ms) +Completed 200 OK in 6ms (Views: 4.2ms | ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +  (0.4ms) ROLLBACK +  (0.2ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-12 14:33:29 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (6.5ms) + Rendered tasks/new.html.erb within layouts/application (7.6ms) +Completed 200 OK in 11ms (Views: 10.4ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.6ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-12 21:33:29.234934"], ["updated_at", "2019-04-12 21:33:29.234934"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190967/edit" for 127.0.0.1 at 2019-04-12 14:33:29 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190967"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (1.6ms) + Rendered tasks/edit.html.erb within layouts/application (2.2ms) +Completed 200 OK in 5ms (Views: 3.4ms | ActiveRecord: 0.3ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-12 14:33:29 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.1ms) BEGIN +  (0.4ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.6ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-12 21:37:49.855919', '2019-04-12 21:37:49.855919'), (298486374, 'MyString', 'MyString', NULL, '2019-04-12 21:37:49.855919', '2019-04-12 21:37:49.855919') +  (0.6ms) COMMIT +  (0.1ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.5ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "making a new one"], ["created_at", "2019-04-12 21:37:49.880880"], ["updated_at", "2019-04-12 21:37:49.880880"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + Task Update (0.5ms) UPDATE "tasks" SET "name" = $1, "updated_at" = $2 WHERE "tasks"."id" = $3 [["name", "not new anymore"], ["updated_at", "2019-04-12 21:37:49.883712"], ["id", 980190963]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-12 21:37:49.891144"], ["updated_at", "2019-04-12 21:37:49.891144"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Task Destroy (0.4ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190964]] +  (0.4ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190964" for 127.0.0.1 at 2019-04-12 14:37:49 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190964"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190964], ["LIMIT", 1]] +Completed 404 Not Found in 8ms (ActiveRecord: 0.5ms) +  (0.4ms) SELECT COUNT(*) FROM "tasks" +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-12 14:37:49 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (14.7ms) + Rendered tasks/new.html.erb within layouts/application (18.2ms) +Completed 200 OK in 199ms (Views: 197.6ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-12 14:37:50 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.3ms) SAVEPOINT active_record_1 + Task Create (0.5ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-12 21:37:50.138732"], ["updated_at", "2019-04-12 21:37:50.138732"]] +  (0.4ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190965" for 127.0.0.1 at 2019-04-12 14:37:50 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190965"} + Task Load (1.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.5ms) +Completed 200 OK in 8ms (Views: 2.1ms | ActiveRecord: 1.2ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-12 14:37:50 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.6ms) SAVEPOINT active_record_1 + Task Create (0.5ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-12 21:37:50.159160"], ["updated_at", "2019-04-12 21:37:50.159160"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 4ms (ActiveRecord: 1.3ms) +  (0.4ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-12 21:37:50.169229"], ["updated_at", "2019-04-12 21:37:50.169229"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190967/edit" for 127.0.0.1 at 2019-04-12 14:37:50 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190967"} + Task Load (1.0ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (2.2ms) + Rendered tasks/edit.html.erb within layouts/application (3.1ms) +Completed 200 OK in 8ms (Views: 4.7ms | ActiveRecord: 1.0ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-12 14:37:50 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.3ms) +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-12 14:37:50 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.5ms) +Completed 200 OK in 6ms (Views: 4.0ms | ActiveRecord: 0.3ms) +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) BEGIN +  (0.4ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.5ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-12 21:41:03.794544', '2019-04-12 21:41:03.794544'), (298486374, 'MyString', 'MyString', NULL, '2019-04-12 21:41:03.794544', '2019-04-12 21:41:03.794544') +  (0.8ms) COMMIT +  (0.1ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-12 14:41:03 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (4.9ms) + Rendered tasks/new.html.erb within layouts/application (6.1ms) +Completed 200 OK in 155ms (Views: 144.3ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.4ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-12 14:41:03 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-12 21:41:03.986750"], ["updated_at", "2019-04-12 21:41:03.986750"]] +  (0.4ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 4ms (ActiveRecord: 1.0ms) +  (0.9ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.6ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-12 14:41:03 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.7ms) +Completed 200 OK in 4ms (Views: 2.4ms | ActiveRecord: 0.3ms) +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.2ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-12 21:41:04.067090"], ["updated_at", "2019-04-12 21:41:04.067090"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190964/edit" for 127.0.0.1 at 2019-04-12 14:41:04 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190964"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190964], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (1.7ms) + Rendered tasks/edit.html.erb within layouts/application (2.2ms) +Completed 200 OK in 5ms (Views: 3.4ms | ActiveRecord: 0.2ms) +  (0.4ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-12 14:41:04 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-12 21:41:04.086980"], ["updated_at", "2019-04-12 21:41:04.086980"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Task Destroy (0.2ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190965]] +  (0.2ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190965" for 127.0.0.1 at 2019-04-12 14:41:04 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190965"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] +Completed 404 Not Found in 1ms (ActiveRecord: 0.3ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "making a new one"], ["created_at", "2019-04-12 21:41:04.097307"], ["updated_at", "2019-04-12 21:41:04.097307"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started PATCH "/tasks/980190966" for 127.0.0.1 at 2019-04-12 14:41:04 -0700 +Processing by TasksController#update as HTML + Parameters: {"task"=>{"name"=>"not new"}, "id"=>"980190966"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190966], ["LIMIT", 1]] +  (0.2ms) SAVEPOINT active_record_1 + Task Update (0.8ms) UPDATE "tasks" SET "name" = $1, "description" = $2, "updated_at" = $3 WHERE "tasks"."id" = $4 [["name", "not new"], ["description", nil], ["updated_at", "2019-04-12 21:41:04.104066"], ["id", 980190966]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks/980190966 +Completed 302 Found in 6ms (ActiveRecord: 1.6ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-12 21:41:04.204241"], ["updated_at", "2019-04-12 21:41:04.204241"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190967" for 127.0.0.1 at 2019-04-12 14:41:04 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190967"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.4ms) +Completed 200 OK in 3ms (Views: 1.6ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-12 14:41:04 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.1ms) BEGIN +  (0.3ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.6ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-12 21:41:21.429108', '2019-04-12 21:41:21.429108'), (298486374, 'MyString', 'MyString', NULL, '2019-04-12 21:41:21.429108', '2019-04-12 21:41:21.429108') +  (1.1ms) COMMIT +  (0.2ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.5ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-12 21:41:21.462070"], ["updated_at", "2019-04-12 21:41:21.462070"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190963/edit" for 127.0.0.1 at 2019-04-12 14:41:21 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190963"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (11.8ms) + Rendered tasks/edit.html.erb within layouts/application (13.7ms) +Completed 200 OK in 157ms (Views: 146.5ms | ActiveRecord: 0.5ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-12 14:41:21 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.5ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.4ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-12 14:41:21 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.3ms) SAVEPOINT active_record_1 + Task Create (0.6ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-12 21:41:21.649658"], ["updated_at", "2019-04-12 21:41:21.649658"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 1.0ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-12 21:41:21.658796"], ["updated_at", "2019-04-12 21:41:21.658796"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Task Destroy (0.4ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190965]] +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190965" for 127.0.0.1 at 2019-04-12 14:41:21 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190965"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] +Completed 404 Not Found in 1ms (ActiveRecord: 0.3ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.5ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-12 21:41:21.667976"], ["updated_at", "2019-04-12 21:41:21.667976"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190966" for 127.0.0.1 at 2019-04-12 14:41:21 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190966"} + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190966], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.5ms) +Completed 200 OK in 4ms (Views: 1.8ms | ActiveRecord: 0.5ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-12 14:41:21 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.2ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-12 14:41:21 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (2.4ms) + Rendered tasks/new.html.erb within layouts/application (3.2ms) +Completed 200 OK in 7ms (Views: 5.0ms | ActiveRecord: 0.0ms) +  (0.4ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-12 14:41:21 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.8ms) +Completed 200 OK in 4ms (Views: 2.8ms | ActiveRecord: 0.3ms) +  (0.3ms) ROLLBACK +  (1.0ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "making a new one"], ["created_at", "2019-04-12 21:41:21.808556"], ["updated_at", "2019-04-12 21:41:21.808556"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started PATCH "/tasks/980190967" for 127.0.0.1 at 2019-04-12 14:41:21 -0700 +Processing by TasksController#update as HTML + Parameters: {"task"=>{"name"=>"not new"}, "id"=>"980190967"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Task Update (0.4ms) UPDATE "tasks" SET "name" = $1, "description" = $2, "updated_at" = $3 WHERE "tasks"."id" = $4 [["name", "not new"], ["description", nil], ["updated_at", "2019-04-12 21:41:21.813577"], ["id", 980190967]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks/980190967 +Completed 302 Found in 4ms (ActiveRecord: 0.9ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.4ms) ROLLBACK +  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) BEGIN +  (0.3ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.6ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-12 21:41:43.422359', '2019-04-12 21:41:43.422359'), (298486374, 'MyString', 'MyString', NULL, '2019-04-12 21:41:43.422359', '2019-04-12 21:41:43.422359') +  (1.1ms) COMMIT +  (0.2ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.6ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-12 21:41:43.447776"], ["updated_at", "2019-04-12 21:41:43.447776"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + Task Destroy (0.5ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190963]] +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190963" for 127.0.0.1 at 2019-04-12 14:41:43 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190963"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] +Completed 404 Not Found in 7ms (ActiveRecord: 0.6ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-12 14:41:43 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-12 21:41:43.477247"], ["updated_at", "2019-04-12 21:41:43.477247"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190964" for 127.0.0.1 at 2019-04-12 14:41:43 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190964"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190964], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.8ms) +Completed 200 OK in 150ms (Views: 148.2ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-12 14:41:43 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-12 21:41:43.637353"], ["updated_at", "2019-04-12 21:41:43.637353"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 0.8ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.6ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.5ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-12 14:41:43 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.7ms) +Completed 200 OK in 6ms (Views: 3.9ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.2ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-12 21:41:43.729730"], ["updated_at", "2019-04-12 21:41:43.729730"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190966/edit" for 127.0.0.1 at 2019-04-12 14:41:43 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190966"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190966], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (9.4ms) + Rendered tasks/edit.html.erb within layouts/application (10.6ms) +Completed 200 OK in 14ms (Views: 12.1ms | ActiveRecord: 0.3ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-12 14:41:43 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "making a new one"], ["created_at", "2019-04-12 21:41:43.753601"], ["updated_at", "2019-04-12 21:41:43.753601"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started PATCH "/tasks/980190967" for 127.0.0.1 at 2019-04-12 14:41:43 -0700 +Processing by TasksController#update as HTML + Parameters: {"task"=>{"name"=>"not new"}, "id"=>"980190967"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Task Update (0.3ms) UPDATE "tasks" SET "name" = $1, "description" = $2, "updated_at" = $3 WHERE "tasks"."id" = $4 [["name", "not new"], ["description", nil], ["updated_at", "2019-04-12 21:41:43.759353"], ["id", 980190967]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks/980190967 +Completed 302 Found in 4ms (ActiveRecord: 0.9ms) + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-12 14:41:43 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (1.6ms) + Rendered tasks/new.html.erb within layouts/application (2.5ms) +Completed 200 OK in 6ms (Views: 4.6ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) BEGIN +  (0.3ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.5ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-12 21:43:50.736686', '2019-04-12 21:43:50.736686'), (298486374, 'MyString', 'MyString', NULL, '2019-04-12 21:43:50.736686', '2019-04-12 21:43:50.736686') +  (0.8ms) COMMIT +  (0.1ms) BEGIN +  (0.3ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.3ms) COMMIT +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.4ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-12 14:43:50 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-12 21:43:50.773516"], ["updated_at", "2019-04-12 21:43:50.773516"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 13ms (ActiveRecord: 0.6ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.4ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-12 21:43:50.785388"], ["updated_at", "2019-04-12 21:43:50.785388"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190964" for 127.0.0.1 at 2019-04-12 14:43:50 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190964"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190964], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.7ms) +Completed 200 OK in 144ms (Views: 142.2ms | ActiveRecord: 0.2ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-12 14:43:50 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-12 14:43:50 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.6ms) +Completed 200 OK in 6ms (Views: 4.8ms | ActiveRecord: 0.4ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.3ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-12 14:43:51 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (7.8ms) + Rendered tasks/new.html.erb within layouts/application (9.0ms) +Completed 200 OK in 12ms (Views: 11.2ms | ActiveRecord: 0.0ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.3ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "making a new one"], ["created_at", "2019-04-12 21:43:51.033940"], ["updated_at", "2019-04-12 21:43:51.033940"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started PATCH "/tasks/980190965" for 127.0.0.1 at 2019-04-12 14:43:51 -0700 +Processing by TasksController#update as HTML + Parameters: {"task"=>{"name"=>"not new"}, "id"=>"980190965"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Task Update (0.3ms) UPDATE "tasks" SET "name" = $1, "description" = $2, "updated_at" = $3 WHERE "tasks"."id" = $4 [["name", "not new"], ["description", nil], ["updated_at", "2019-04-12 21:43:51.038998"], ["id", 980190965]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks/980190965 +Completed 302 Found in 3ms (ActiveRecord: 0.9ms) + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-12 21:43:51.047458"], ["updated_at", "2019-04-12 21:43:51.047458"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190966" for 127.0.0.1 at 2019-04-12 14:43:51 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190966"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190966], ["LIMIT", 1]] +  (0.2ms) SAVEPOINT active_record_1 + Task Destroy (0.3ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190966]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 0.9ms) +  (0.4ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."description" = $1 LIMIT $2 [["description", "Read one book per week"], ["LIMIT", 1]] +  (0.1ms) ROLLBACK +  (0.2ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-12 21:43:51.061020"], ["updated_at", "2019-04-12 21:43:51.061020"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190967/edit" for 127.0.0.1 at 2019-04-12 14:43:51 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190967"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (2.0ms) + Rendered tasks/edit.html.erb within layouts/application (2.6ms) +Completed 200 OK in 7ms (Views: 4.9ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-12 14:43:51 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.3ms) +  (0.1ms) ROLLBACK +  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) BEGIN +  (0.3ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.6ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-12 21:44:23.629990', '2019-04-12 21:44:23.629990'), (298486374, 'MyString', 'MyString', NULL, '2019-04-12 21:44:23.629990', '2019-04-12 21:44:23.629990') +  (1.0ms) COMMIT +  (0.3ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.2ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.4ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-12 14:44:23 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-12 21:44:23.679838"], ["updated_at", "2019-04-12 21:44:23.679838"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 25ms (ActiveRecord: 0.7ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-12 14:44:23 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.0ms) +Completed 200 OK in 129ms (Views: 127.5ms | ActiveRecord: 0.3ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.2ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.5ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-12 21:44:23.915347"], ["updated_at", "2019-04-12 21:44:23.915347"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190964/edit" for 127.0.0.1 at 2019-04-12 14:44:23 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190964"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190964], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (5.4ms) + Rendered tasks/edit.html.erb within layouts/application (6.4ms) +Completed 200 OK in 10ms (Views: 7.6ms | ActiveRecord: 0.2ms) +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-12 14:44:23 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.3ms) +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-12 21:44:23.936318"], ["updated_at", "2019-04-12 21:44:23.936318"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190965" for 127.0.0.1 at 2019-04-12 14:44:23 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190965"} + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.7ms) +Completed 200 OK in 6ms (Views: 2.7ms | ActiveRecord: 0.5ms) +  (0.4ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-12 14:44:23 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.4ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-12 21:44:23.953798"], ["updated_at", "2019-04-12 21:44:23.953798"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190966" for 127.0.0.1 at 2019-04-12 14:44:23 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190966"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190966], ["LIMIT", 1]] +  (0.2ms) SAVEPOINT active_record_1 + Task Destroy (0.4ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190966]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 4ms (ActiveRecord: 1.2ms) +  (0.4ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."description" = $1 LIMIT $2 [["description", "Read one book per week"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "making a new one"], ["created_at", "2019-04-12 21:44:23.968333"], ["updated_at", "2019-04-12 21:44:23.968333"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started PATCH "/tasks/980190967" for 127.0.0.1 at 2019-04-12 14:44:23 -0700 +Processing by TasksController#update as HTML + Parameters: {"task"=>{"name"=>"not new"}, "id"=>"980190967"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] +  (0.2ms) SAVEPOINT active_record_1 + Task Update (0.7ms) UPDATE "tasks" SET "name" = $1, "description" = $2, "updated_at" = $3 WHERE "tasks"."id" = $4 [["name", "not new"], ["description", nil], ["updated_at", "2019-04-12 21:44:23.973967"], ["id", 980190967]] +  (0.4ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks/980190967 +Completed 302 Found in 6ms (ActiveRecord: 1.7ms) + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-12 14:44:23 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (2.5ms) + Rendered tasks/new.html.erb within layouts/application (3.1ms) +Completed 200 OK in 6ms (Views: 5.4ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) BEGIN +  (0.3ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.6ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-12 21:44:58.293851', '2019-04-12 21:44:58.293851'), (298486374, 'MyString', 'MyString', NULL, '2019-04-12 21:44:58.293851', '2019-04-12 21:44:58.293851') +  (0.9ms) COMMIT +  (0.2ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-12 14:44:58 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 8ms (ActiveRecord: 0.6ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-12 21:44:58.337368"], ["updated_at", "2019-04-12 21:44:58.337368"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190963" for 127.0.0.1 at 2019-04-12 14:44:58 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190963"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (1.6ms) +Completed 200 OK in 232ms (Views: 230.0ms | ActiveRecord: 0.3ms) +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-12 21:44:58.577119"], ["updated_at", "2019-04-12 21:44:58.577119"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190964" for 127.0.0.1 at 2019-04-12 14:44:58 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190964"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190964], ["LIMIT", 1]] +  (0.2ms) SAVEPOINT active_record_1 + Task Destroy (0.7ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190964]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 5ms (ActiveRecord: 1.5ms) +  (0.4ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."description" = $1 LIMIT $2 [["description", "Read one book per week"], ["LIMIT", 1]] +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "making a new one"], ["created_at", "2019-04-12 21:44:58.597037"], ["updated_at", "2019-04-12 21:44:58.597037"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started PATCH "/tasks/980190965" for 127.0.0.1 at 2019-04-12 14:44:58 -0700 +Processing by TasksController#update as HTML + Parameters: {"task"=>{"name"=>"not new"}, "id"=>"980190965"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Task Update (0.3ms) UPDATE "tasks" SET "name" = $1, "description" = $2, "updated_at" = $3 WHERE "tasks"."id" = $4 [["name", "not new"], ["description", nil], ["updated_at", "2019-04-12 21:44:58.602401"], ["id", 980190965]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks/980190965 +Completed 302 Found in 3ms (ActiveRecord: 0.9ms) + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.1ms) ROLLBACK +  (0.2ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-12 14:44:58 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (8.4ms) + Rendered tasks/new.html.erb within layouts/application (10.4ms) +Completed 200 OK in 14ms (Views: 12.4ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.8ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-12 14:44:58 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-12 21:44:58.636433"], ["updated_at", "2019-04-12 21:44:58.636433"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 0.7ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-12 14:44:58 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.8ms) +Completed 200 OK in 4ms (Views: 2.7ms | ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.6ms) SAVEPOINT active_record_1 + Task Create (0.9ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-12 21:44:58.722455"], ["updated_at", "2019-04-12 21:44:58.722455"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190967/edit" for 127.0.0.1 at 2019-04-12 14:44:58 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190967"} + Task Load (0.7ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (1.2ms) + Rendered tasks/edit.html.erb within layouts/application (1.7ms) +Completed 200 OK in 5ms (Views: 2.9ms | ActiveRecord: 0.7ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-12 14:44:58 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.2ms) +  (0.2ms) ROLLBACK +  (0.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.3ms) BEGIN +  (0.5ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.8ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-12 21:46:48.164295', '2019-04-12 21:46:48.164295'), (298486374, 'MyString', 'MyString', NULL, '2019-04-12 21:46:48.164295', '2019-04-12 21:46:48.164295') +  (1.2ms) COMMIT +  (0.2ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "making a new one"], ["created_at", "2019-04-12 21:46:48.185181"], ["updated_at", "2019-04-12 21:46:48.185181"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started PATCH "/tasks/980190963" for 127.0.0.1 at 2019-04-12 14:46:48 -0700 +Processing by TasksController#update as HTML + Parameters: {"task"=>{"name"=>"not new"}, "id"=>"980190963"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] +  (0.2ms) SAVEPOINT active_record_1 + Task Update (0.3ms) UPDATE "tasks" SET "name" = $1, "description" = $2, "updated_at" = $3 WHERE "tasks"."id" = $4 [["name", "not new"], ["description", nil], ["updated_at", "2019-04-12 21:46:48.203755"], ["id", 980190963]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks/980190963 +Completed 302 Found in 9ms (ActiveRecord: 1.1ms) + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-12 21:46:48.213010"], ["updated_at", "2019-04-12 21:46:48.213010"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190964" for 127.0.0.1 at 2019-04-12 14:46:48 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190964"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190964], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Task Destroy (0.3ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190964]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.8ms) +  (0.2ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."description" = $1 LIMIT $2 [["description", "Read one book per week"], ["LIMIT", 1]] +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-12 14:46:48 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (4.8ms) + Rendered tasks/new.html.erb within layouts/application (6.4ms) +Completed 200 OK in 140ms (Views: 138.4ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-12 14:46:48 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-12 21:46:48.371245"], ["updated_at", "2019-04-12 21:46:48.371245"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 0.7ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-12 14:46:48 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.8ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (3.3ms) +Completed 200 OK in 6ms (Views: 4.2ms | ActiveRecord: 0.8ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-12 14:46:48 -0700 +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-12 21:46:48.394788"], ["updated_at", "2019-04-12 21:46:48.394788"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190966" for 127.0.0.1 at 2019-04-12 14:46:48 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190966"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190966], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.4ms) +Completed 200 OK in 3ms (Views: 1.4ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-12 14:46:48 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.2ms) +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-12 21:46:48.405508"], ["updated_at", "2019-04-12 21:46:48.405508"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190967/edit" for 127.0.0.1 at 2019-04-12 14:46:48 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190967"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (2.4ms) + Rendered tasks/edit.html.erb within layouts/application (3.0ms) +Completed 200 OK in 7ms (Views: 4.9ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-12 14:46:48 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.2ms) +  (0.1ms) ROLLBACK +  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) BEGIN +  (0.4ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.6ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-12 21:46:59.952557', '2019-04-12 21:46:59.952557'), (298486374, 'MyString', 'MyString', NULL, '2019-04-12 21:46:59.952557', '2019-04-12 21:46:59.952557') +  (0.8ms) COMMIT +  (0.1ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-12 14:46:59 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (12.9ms) +Completed 200 OK in 216ms (Views: 209.0ms | ActiveRecord: 0.4ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-12 14:47:00 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.8ms) +Completed 200 OK in 4ms (Views: 2.9ms | ActiveRecord: 0.5ms) +  (0.2ms) ROLLBACK +  (0.3ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-12 14:47:00 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (9.4ms) + Rendered tasks/new.html.erb within layouts/application (10.8ms) +Completed 200 OK in 14ms (Views: 12.6ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-12 21:47:00.225354"], ["updated_at", "2019-04-12 21:47:00.225354"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190963/edit" for 127.0.0.1 at 2019-04-12 14:47:00 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190963"} + Task Load (0.6ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (2.1ms) + Rendered tasks/edit.html.erb within layouts/application (3.0ms) +Completed 200 OK in 10ms (Views: 5.3ms | ActiveRecord: 0.9ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-12 14:47:00 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.4ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-12 14:47:00 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (2.8ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-12 21:47:00.258304"], ["updated_at", "2019-04-12 21:47:00.258304"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 6ms (ActiveRecord: 3.3ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-12 21:47:00.265406"], ["updated_at", "2019-04-12 21:47:00.265406"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190965" for 127.0.0.1 at 2019-04-12 14:47:00 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190965"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.6ms) +Completed 200 OK in 6ms (Views: 3.7ms | ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-12 14:47:00 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "making a new one"], ["created_at", "2019-04-12 21:47:00.283522"], ["updated_at", "2019-04-12 21:47:00.283522"]] +  (0.4ms) RELEASE SAVEPOINT active_record_1 +Started PATCH "/tasks/980190966" for 127.0.0.1 at 2019-04-12 14:47:00 -0700 +Processing by TasksController#update as HTML + Parameters: {"task"=>{"name"=>"not new"}, "id"=>"980190966"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190966], ["LIMIT", 1]] +  (0.2ms) SAVEPOINT active_record_1 + Task Update (0.5ms) UPDATE "tasks" SET "name" = $1, "description" = $2, "updated_at" = $3 WHERE "tasks"."id" = $4 [["name", "not new"], ["description", nil], ["updated_at", "2019-04-12 21:47:00.290011"], ["id", 980190966]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks/980190966 +Completed 302 Found in 5ms (ActiveRecord: 1.2ms) + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190966], ["LIMIT", 1]] +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-12 21:47:00.297783"], ["updated_at", "2019-04-12 21:47:00.297783"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190967" for 127.0.0.1 at 2019-04-12 14:47:00 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190967"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] +  (0.3ms) SAVEPOINT active_record_1 + Task Destroy (0.4ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190967]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 1.1ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."description" = $1 LIMIT $2 [["description", "Read one book per week"], ["LIMIT", 1]] +  (0.3ms) ROLLBACK +  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) BEGIN +  (0.4ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.6ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-12 21:48:01.656059', '2019-04-12 21:48:01.656059'), (298486374, 'MyString', 'MyString', NULL, '2019-04-12 21:48:01.656059', '2019-04-12 21:48:01.656059') +  (0.8ms) COMMIT +  (0.2ms) BEGIN +  (0.5ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.3ms) COMMIT +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-12 14:48:01 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (12.8ms) + Rendered tasks/new.html.erb within layouts/application (15.7ms) +Completed 200 OK in 198ms (Views: 177.5ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.5ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-12 14:48:01 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.5ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-12 21:48:01.903088"], ["updated_at", "2019-04-12 21:48:01.903088"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 4ms (ActiveRecord: 0.9ms) +  (0.4ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.6ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.3ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "making a new one"], ["created_at", "2019-04-12 21:48:01.917546"], ["updated_at", "2019-04-12 21:48:01.917546"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started PATCH "/tasks/980190964" for 127.0.0.1 at 2019-04-12 14:48:01 -0700 +Processing by TasksController#update as HTML + Parameters: {"task"=>{"name"=>"not new"}, "id"=>"980190964"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190964], ["LIMIT", 1]] +  (0.2ms) SAVEPOINT active_record_1 + Task Update (0.3ms) UPDATE "tasks" SET "name" = $1, "description" = $2, "updated_at" = $3 WHERE "tasks"."id" = $4 [["name", "not new"], ["description", nil], ["updated_at", "2019-04-12 21:48:01.923244"], ["id", 980190964]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks/980190964 +Completed 302 Found in 4ms (ActiveRecord: 1.0ms) + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190964], ["LIMIT", 1]] +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-12 21:48:01.930687"], ["updated_at", "2019-04-12 21:48:01.930687"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190965" for 127.0.0.1 at 2019-04-12 14:48:01 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190965"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.6ms) +Completed 200 OK in 4ms (Views: 2.4ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-12 14:48:01 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-12 14:48:01 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.3ms) +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-12 21:48:01.953861"], ["updated_at", "2019-04-12 21:48:01.953861"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190966/edit" for 127.0.0.1 at 2019-04-12 14:48:01 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190966"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190966], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (2.2ms) + Rendered tasks/edit.html.erb within layouts/application (3.0ms) +Completed 200 OK in 8ms (Views: 5.9ms | ActiveRecord: 0.3ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-12 21:48:01.970944"], ["updated_at", "2019-04-12 21:48:01.970944"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190967" for 127.0.0.1 at 2019-04-12 14:48:01 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190967"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] +  (0.2ms) SAVEPOINT active_record_1 + Task Destroy (0.3ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190967]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 0.8ms) +  (0.2ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."description" = $1 LIMIT $2 [["description", "Read one book per week"], ["LIMIT", 1]] +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-12 14:48:01 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.8ms) +Completed 200 OK in 4ms (Views: 3.1ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-12 14:48:01 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.6ms) +Completed 200 OK in 4ms (Views: 3.1ms | ActiveRecord: 0.4ms) +  (0.5ms) ROLLBACK +  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) BEGIN +  (0.3ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.6ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-12 21:49:16.575815', '2019-04-12 21:49:16.575815'), (298486374, 'MyString', 'MyString', NULL, '2019-04-12 21:49:16.575815', '2019-04-12 21:49:16.575815') +  (0.7ms) COMMIT +  (0.1ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.2ms) COMMIT +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.3ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-12 21:49:16.601505"], ["updated_at", "2019-04-12 21:49:16.601505"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190963" for 127.0.0.1 at 2019-04-12 14:49:16 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190963"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] +  (0.2ms) SAVEPOINT active_record_1 + Task Destroy (0.3ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190963]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 10ms (ActiveRecord: 1.1ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."description" = $1 LIMIT $2 [["description", "Read one book per week"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-12 14:49:16 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-12 21:49:16.631257"], ["updated_at", "2019-04-12 21:49:16.631257"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.6ms) +  (0.2ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-12 21:49:16.637613"], ["updated_at", "2019-04-12 21:49:16.637613"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190965/edit" for 127.0.0.1 at 2019-04-12 14:49:16 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190965"} + Task Load (0.6ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (8.1ms) + Rendered tasks/edit.html.erb within layouts/application (9.4ms) +Completed 200 OK in 161ms (Views: 158.0ms | ActiveRecord: 0.6ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-12 14:49:16 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "making a new one"], ["created_at", "2019-04-12 21:49:16.811027"], ["updated_at", "2019-04-12 21:49:16.811027"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started PATCH "/tasks/980190966" for 127.0.0.1 at 2019-04-12 14:49:16 -0700 +Processing by TasksController#update as HTML + Parameters: {"task"=>{"name"=>"not new"}, "id"=>"980190966"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190966], ["LIMIT", 1]] +  (0.2ms) SAVEPOINT active_record_1 + Task Update (0.6ms) UPDATE "tasks" SET "name" = $1, "description" = $2, "updated_at" = $3 WHERE "tasks"."id" = $4 [["name", "not new"], ["description", nil], ["updated_at", "2019-04-12 21:49:16.817081"], ["id", 980190966]] +  (0.5ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks/980190966 +Completed 302 Found in 6ms (ActiveRecord: 1.5ms) + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190966], ["LIMIT", 1]] +  (0.4ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-12 14:49:16 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.1ms) +Completed 200 OK in 5ms (Views: 3.0ms | ActiveRecord: 0.5ms) +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-12 14:49:16 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.1ms) +Completed 200 OK in 3ms (Views: 2.0ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-12 21:49:16.845026"], ["updated_at", "2019-04-12 21:49:16.845026"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190967" for 127.0.0.1 at 2019-04-12 14:49:16 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190967"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.6ms) +Completed 200 OK in 4ms (Views: 2.4ms | ActiveRecord: 0.3ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-12 14:49:16 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.2ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-12 14:49:16 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (1.2ms) + Rendered tasks/new.html.erb within layouts/application (1.8ms) +Completed 200 OK in 4ms (Views: 3.2ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.2ms) ROLLBACK +  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) BEGIN +  (0.4ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.5ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-12 21:49:27.622378', '2019-04-12 21:49:27.622378'), (298486374, 'MyString', 'MyString', NULL, '2019-04-12 21:49:27.622378', '2019-04-12 21:49:27.622378') +  (0.8ms) COMMIT +  (0.1ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (1.5ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-12 21:49:27.645266"], ["updated_at", "2019-04-12 21:49:27.645266"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190963/edit" for 127.0.0.1 at 2019-04-12 14:49:27 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190963"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (15.8ms) + Rendered tasks/edit.html.erb within layouts/application (18.7ms) +Completed 200 OK in 213ms (Views: 200.2ms | ActiveRecord: 0.5ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-12 14:49:27 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.4ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-12 14:49:27 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.5ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-12 21:49:27.893327"], ["updated_at", "2019-04-12 21:49:27.893327"]] +  (0.4ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 4ms (ActiveRecord: 1.1ms) +  (0.4ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.5ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "making a new one"], ["created_at", "2019-04-12 21:49:27.906109"], ["updated_at", "2019-04-12 21:49:27.906109"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started PATCH "/tasks/980190965" for 127.0.0.1 at 2019-04-12 14:49:27 -0700 +Processing by TasksController#update as HTML + Parameters: {"task"=>{"name"=>"not new"}, "id"=>"980190965"} + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] +  (0.2ms) SAVEPOINT active_record_1 + Task Update (0.4ms) UPDATE "tasks" SET "name" = $1, "description" = $2, "updated_at" = $3 WHERE "tasks"."id" = $4 [["name", "not new"], ["description", nil], ["updated_at", "2019-04-12 21:49:27.912406"], ["id", 980190965]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks/980190965 +Completed 302 Found in 4ms (ActiveRecord: 1.2ms) + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-12 21:49:27.925174"], ["updated_at", "2019-04-12 21:49:27.925174"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190966" for 127.0.0.1 at 2019-04-12 14:49:27 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190966"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190966], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Task Destroy (0.2ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190966]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.8ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."description" = $1 LIMIT $2 [["description", "Read one book per week"], ["LIMIT", 1]] +  (0.4ms) ROLLBACK +  (0.2ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-12 21:49:27.938211"], ["updated_at", "2019-04-12 21:49:27.938211"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190967" for 127.0.0.1 at 2019-04-12 14:49:27 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190967"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.6ms) +Completed 200 OK in 5ms (Views: 2.3ms | ActiveRecord: 0.4ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-12 14:49:27 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.5ms) +  (0.3ms) ROLLBACK +  (0.5ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-12 14:49:27 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.2ms) +Completed 200 OK in 5ms (Views: 3.3ms | ActiveRecord: 0.4ms) +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-12 14:49:27 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.8ms) +Completed 200 OK in 4ms (Views: 3.3ms | ActiveRecord: 0.4ms) +  (0.5ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-12 14:49:27 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (2.2ms) + Rendered tasks/new.html.erb within layouts/application (2.9ms) +Completed 200 OK in 6ms (Views: 5.2ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) BEGIN +  (0.6ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (2.1ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-12 21:49:45.879466', '2019-04-12 21:49:45.879466'), (298486374, 'MyString', 'MyString', NULL, '2019-04-12 21:49:45.879466', '2019-04-12 21:49:45.879466') +  (0.8ms) COMMIT +  (0.1ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "making a new one"], ["created_at", "2019-04-12 21:49:45.922459"], ["updated_at", "2019-04-12 21:49:45.922459"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started PATCH "/tasks/980190963" for 127.0.0.1 at 2019-04-12 14:49:45 -0700 +Processing by TasksController#update as HTML + Parameters: {"task"=>{"name"=>"not new"}, "id"=>"980190963"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Task Update (0.4ms) UPDATE "tasks" SET "name" = $1, "description" = $2, "updated_at" = $3 WHERE "tasks"."id" = $4 [["name", "not new"], ["description", nil], ["updated_at", "2019-04-12 21:49:45.952542"], ["id", 980190963]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks/980190963 +Completed 302 Found in 15ms (ActiveRecord: 1.3ms) + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.4ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-12 14:49:45 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-12 21:49:45.992920"], ["updated_at", "2019-04-12 21:49:45.992920"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 24ms (ActiveRecord: 0.8ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-12 21:49:46.000909"], ["updated_at", "2019-04-12 21:49:46.000909"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190965" for 127.0.0.1 at 2019-04-12 14:49:46 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190965"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Task Destroy (0.3ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190965]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 0.8ms) +  (0.2ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."description" = $1 LIMIT $2 [["description", "Read one book per week"], ["LIMIT", 1]] +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-12 14:49:46 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (7.9ms) + Rendered tasks/new.html.erb within layouts/application (9.5ms) +Completed 200 OK in 145ms (Views: 144.0ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-12 14:49:46 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-12 21:49:46.168450"], ["updated_at", "2019-04-12 21:49:46.168450"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190966" for 127.0.0.1 at 2019-04-12 14:49:46 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190966"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190966], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.6ms) +Completed 200 OK in 5ms (Views: 3.2ms | ActiveRecord: 0.4ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (1.7ms) SAVEPOINT active_record_1 + Task Create (0.5ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-12 21:49:46.183674"], ["updated_at", "2019-04-12 21:49:46.183674"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190967/edit" for 127.0.0.1 at 2019-04-12 14:49:46 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190967"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (2.3ms) + Rendered tasks/edit.html.erb within layouts/application (3.1ms) +Completed 200 OK in 7ms (Views: 4.5ms | ActiveRecord: 0.4ms) +  (0.8ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-12 14:49:46 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.3ms) +  (0.5ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-12 14:49:46 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.5ms) +Completed 200 OK in 6ms (Views: 4.0ms | ActiveRecord: 0.4ms) +  (1.0ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-12 14:49:46 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.4ms) +Completed 200 OK in 3ms (Views: 2.6ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.3ms) BEGIN +  (0.6ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.2ms) COMMIT +  (0.2ms) BEGIN + Fixtures Load (0.7ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-12 21:50:34.483026', '2019-04-12 21:50:34.483026'), (298486374, 'MyString', 'MyString', NULL, '2019-04-12 21:50:34.483026', '2019-04-12 21:50:34.483026') +  (0.8ms) COMMIT +  (0.1ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.2ms) ROLLBACK +  (0.3ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.4ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-12 14:50:34 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-12 21:50:34.530500"], ["updated_at", "2019-04-12 21:50:34.530500"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 8ms (ActiveRecord: 0.7ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-12 14:50:34 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (9.3ms) + Rendered tasks/new.html.erb within layouts/application (10.8ms) +Completed 200 OK in 168ms (Views: 166.5ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.5ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-12 21:50:34.716720"], ["updated_at", "2019-04-12 21:50:34.716720"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190964" for 127.0.0.1 at 2019-04-12 14:50:34 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190964"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190964], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.6ms) +Completed 200 OK in 5ms (Views: 2.5ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-12 14:50:34 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.4ms) +  (0.5ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "making a new one"], ["created_at", "2019-04-12 21:50:34.736987"], ["updated_at", "2019-04-12 21:50:34.736987"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started PATCH "/tasks/980190965" for 127.0.0.1 at 2019-04-12 14:50:34 -0700 +Processing by TasksController#update as HTML + Parameters: {"task"=>{"name"=>"not new"}, "id"=>"980190965"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] +  (0.2ms) SAVEPOINT active_record_1 + Task Update (0.5ms) UPDATE "tasks" SET "name" = $1, "description" = $2, "updated_at" = $3 WHERE "tasks"."id" = $4 [["name", "not new"], ["description", nil], ["updated_at", "2019-04-12 21:50:34.742834"], ["id", 980190965]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks/980190965 +Completed 302 Found in 5ms (ActiveRecord: 1.1ms) + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.3ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-12 21:50:34.753852"], ["updated_at", "2019-04-12 21:50:34.753852"]] +  (0.6ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190966" for 127.0.0.1 at 2019-04-12 14:50:34 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190966"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190966], ["LIMIT", 1]] +  (0.2ms) SAVEPOINT active_record_1 + Task Destroy (0.3ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190966]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 0.9ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."description" = $1 LIMIT $2 [["description", "Read one book per week"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-12 14:50:34 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.6ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.6ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-12 21:50:34.774315"], ["updated_at", "2019-04-12 21:50:34.774315"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190967/edit" for 127.0.0.1 at 2019-04-12 14:50:34 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190967"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (1.3ms) + Rendered tasks/edit.html.erb within layouts/application (1.9ms) +Completed 200 OK in 6ms (Views: 3.9ms | ActiveRecord: 0.2ms) +  (0.5ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-12 14:50:34 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.0ms) +Completed 200 OK in 5ms (Views: 3.3ms | ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-12 14:50:34 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.6ms) +Completed 200 OK in 5ms (Views: 4.0ms | ActiveRecord: 0.5ms) +  (0.4ms) ROLLBACK +  (0.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.1ms) BEGIN +  (0.7ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.2ms) COMMIT +  (0.2ms) BEGIN + Fixtures Load (1.3ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-12 21:55:31.692630', '2019-04-12 21:55:31.692630'), (298486374, 'MyString', 'MyString', NULL, '2019-04-12 21:55:31.692630', '2019-04-12 21:55:31.692630') +  (0.5ms) COMMIT +  (0.1ms) BEGIN +  (0.4ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-12 14:55:31 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (8.6ms) +Completed 200 OK in 233ms (Views: 224.2ms | ActiveRecord: 0.4ms) +  (0.4ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-12 14:55:31 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.7ms) +Completed 200 OK in 4ms (Views: 3.2ms | ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-12 14:55:31 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 5ms (ActiveRecord: 0.6ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.3ms) SAVEPOINT active_record_1 + Task Create (0.6ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-12 21:55:32.005120"], ["updated_at", "2019-04-12 21:55:32.005120"]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190963" for 127.0.0.1 at 2019-04-12 14:55:32 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190963"} + Task Load (0.9ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.6ms) +Completed 200 OK in 7ms (Views: 2.3ms | ActiveRecord: 0.9ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-12 14:55:32 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.8ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-12 21:55:32.027153"], ["updated_at", "2019-04-12 21:55:32.027153"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190964/edit" for 127.0.0.1 at 2019-04-12 14:55:32 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190964"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190964], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (16.8ms) + Rendered tasks/edit.html.erb within layouts/application (18.9ms) +Completed 200 OK in 23ms (Views: 20.5ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-12 14:55:32 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (2.9ms) + Rendered tasks/new.html.erb within layouts/application (3.8ms) +Completed 200 OK in 8ms (Views: 6.0ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.4ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-12 14:55:32 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-12 21:55:32.078775"], ["updated_at", "2019-04-12 21:55:32.078775"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.6ms) +  (0.2ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "making a new one"], ["created_at", "2019-04-12 21:55:32.086103"], ["updated_at", "2019-04-12 21:55:32.086103"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started PATCH "/tasks/980190966?task%5Bname%5D=not+new" for 127.0.0.1 at 2019-04-12 14:55:32 -0700 +Processing by TasksController#update as HTML + Parameters: {"task"=>{"name"=>"not new"}, "id"=>"980190966"} + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190966], ["LIMIT", 1]] +  (0.2ms) SAVEPOINT active_record_1 + Task Update (0.7ms) UPDATE "tasks" SET "name" = $1, "description" = $2, "updated_at" = $3 WHERE "tasks"."id" = $4 [["name", "not new"], ["description", nil], ["updated_at", "2019-04-12 21:55:32.092951"], ["id", 980190966]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks/980190966 +Completed 302 Found in 6ms (ActiveRecord: 1.6ms) + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190966], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-12 21:55:32.102530"], ["updated_at", "2019-04-12 21:55:32.102530"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190967" for 127.0.0.1 at 2019-04-12 14:55:32 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190967"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] +  (0.2ms) SAVEPOINT active_record_1 + Task Destroy (0.4ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190967]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 4ms (ActiveRecord: 1.1ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."description" = $1 LIMIT $2 [["description", "Read one book per week"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.4ms) BEGIN +  (0.4ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.2ms) COMMIT +  (0.2ms) BEGIN + Fixtures Load (1.0ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-12 21:56:54.543138', '2019-04-12 21:56:54.543138'), (298486374, 'MyString', 'MyString', NULL, '2019-04-12 21:56:54.543138', '2019-04-12 21:56:54.543138') +  (1.5ms) COMMIT +  (0.2ms) BEGIN +  (2.3ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.2ms) COMMIT +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-12 21:56:54.582796"], ["updated_at", "2019-04-12 21:56:54.582796"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190963" for 127.0.0.1 at 2019-04-12 14:56:54 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190963"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] +  (0.2ms) SAVEPOINT active_record_1 + Task Destroy (0.3ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190963]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 12ms (ActiveRecord: 1.1ms) +  (0.4ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."description" = $1 LIMIT $2 [["description", "Read one book per week"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-12 21:56:54.639647"], ["updated_at", "2019-04-12 21:56:54.639647"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190964" for 127.0.0.1 at 2019-04-12 14:56:54 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190964"} + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190964], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (1.3ms) +Completed 200 OK in 140ms (Views: 136.9ms | ActiveRecord: 0.5ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-12 14:56:54 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-12 14:56:54 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.3ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-12 21:56:54.795716"], ["updated_at", "2019-04-12 21:56:54.795716"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 4ms (ActiveRecord: 1.0ms) +  (0.4ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.7ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-12 21:56:54.805210"], ["updated_at", "2019-04-12 21:56:54.805210"]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190966/edit" for 127.0.0.1 at 2019-04-12 14:56:54 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190966"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190966], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (8.2ms) + Rendered tasks/edit.html.erb within layouts/application (10.4ms) +Completed 200 OK in 16ms (Views: 13.3ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-12 14:56:54 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-12 14:56:54 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (2.2ms) + Rendered tasks/new.html.erb within layouts/application (3.1ms) +Completed 200 OK in 7ms (Views: 5.1ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.3ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-12 14:56:54 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.9ms) +Completed 200 OK in 4ms (Views: 2.8ms | ActiveRecord: 0.3ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-12 14:56:54 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.9ms) +Completed 200 OK in 5ms (Views: 3.6ms | ActiveRecord: 0.3ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "making a new one"], ["created_at", "2019-04-12 21:56:54.866930"], ["updated_at", "2019-04-12 21:56:54.866930"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started PATCH "/tasks/980190967" for 127.0.0.1 at 2019-04-12 14:56:54 -0700 +Processing by TasksController#update as HTML + Parameters: {"task"=>{"name"=>"not new"}, "id"=>"980190967"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] +  (0.2ms) SAVEPOINT active_record_1 + Task Update (0.6ms) UPDATE "tasks" SET "name" = $1, "description" = $2, "updated_at" = $3 WHERE "tasks"."id" = $4 [["name", "not new"], ["description", nil], ["updated_at", "2019-04-12 21:56:54.872478"], ["id", 980190967]] +  (0.6ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks/980190967 +Completed 302 Found in 6ms (ActiveRecord: 1.7ms) + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.1ms) BEGIN +  (0.4ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.6ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-12 21:57:25.893248', '2019-04-12 21:57:25.893248'), (298486374, 'MyString', 'MyString', NULL, '2019-04-12 21:57:25.893248', '2019-04-12 21:57:25.893248') +  (0.8ms) COMMIT +  (0.1ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.6ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-12 21:57:25.916739"], ["updated_at", "2019-04-12 21:57:25.916739"]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190963" for 127.0.0.1 at 2019-04-12 14:57:25 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190963"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (1.0ms) +Completed 200 OK in 141ms (Views: 130.7ms | ActiveRecord: 0.5ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-12 14:57:26 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-12 14:57:26 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (7.5ms) + Rendered tasks/new.html.erb within layouts/application (9.4ms) +Completed 200 OK in 13ms (Views: 11.2ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-12 14:57:26 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-12 21:57:26.104961"], ["updated_at", "2019-04-12 21:57:26.104961"]] +  (0.4ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 4ms (ActiveRecord: 1.0ms) +  (0.4ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-12 21:57:26.113700"], ["updated_at", "2019-04-12 21:57:26.113700"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190965" for 127.0.0.1 at 2019-04-12 14:57:26 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190965"} + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] +  (0.4ms) SAVEPOINT active_record_1 + Task Destroy (0.6ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190965]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 5ms (ActiveRecord: 1.7ms) +  (0.5ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."description" = $1 LIMIT $2 [["description", "Read one book per week"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-12 14:57:26 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.8ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-12 21:57:26.133209"], ["updated_at", "2019-04-12 21:57:26.133209"]] +  (0.8ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190966/edit" for 127.0.0.1 at 2019-04-12 14:57:26 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190966"} + Task Load (0.6ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190966], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (2.1ms) + Rendered tasks/edit.html.erb within layouts/application (2.8ms) +Completed 200 OK in 7ms (Views: 4.5ms | ActiveRecord: 0.6ms) +  (0.4ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.5ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "making a new one"], ["created_at", "2019-04-12 21:57:26.150927"], ["updated_at", "2019-04-12 21:57:26.150927"]] +  (0.4ms) RELEASE SAVEPOINT active_record_1 +Started PATCH "/tasks/980190967" for 127.0.0.1 at 2019-04-12 14:57:26 -0700 +Processing by TasksController#update as HTML + Parameters: {"task"=>{"name"=>"not new"}, "id"=>"980190967"} + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Task Update (0.5ms) UPDATE "tasks" SET "name" = $1, "description" = $2, "updated_at" = $3 WHERE "tasks"."id" = $4 [["name", "not new"], ["description", nil], ["updated_at", "2019-04-12 21:57:26.158998"], ["id", 980190967]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks/980190967 +Completed 302 Found in 5ms (ActiveRecord: 1.4ms) + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-12 14:57:26 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.7ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (3.5ms) +Completed 200 OK in 8ms (Views: 5.5ms | ActiveRecord: 0.7ms) +  (0.5ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-12 14:57:26 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.2ms) +Completed 200 OK in 3ms (Views: 2.2ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) BEGIN +  (0.3ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.7ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-12 22:03:31.158187', '2019-04-12 22:03:31.158187'), (298486374, 'MyString', 'MyString', NULL, '2019-04-12 22:03:31.158187', '2019-04-12 22:03:31.158187') +  (0.8ms) COMMIT +  (0.1ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.4ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-12 15:03:31 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.3ms) SAVEPOINT active_record_1 + Task Create (1.2ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-12 22:03:31.213303"], ["updated_at", "2019-04-12 22:03:31.213303"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 21ms (ActiveRecord: 1.6ms) +  (0.4ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-12 22:03:31.227548"], ["updated_at", "2019-04-12 22:03:31.227548"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190964" for 127.0.0.1 at 2019-04-12 15:03:31 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190964"} + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190964], ["LIMIT", 1]] +  (0.2ms) SAVEPOINT active_record_1 + Task Destroy (0.3ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190964]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 5ms (ActiveRecord: 1.1ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."description" = $1 LIMIT $2 [["description", "Read one book per week"], ["LIMIT", 1]] +  (1.0ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-12 15:03:31 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (15.0ms) + Rendered tasks/new.html.erb within layouts/application (17.9ms) +Completed 200 OK in 168ms (Views: 166.8ms | ActiveRecord: 0.0ms) +  (0.4ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-12 15:03:31 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.2ms) +Completed 200 OK in 5ms (Views: 3.6ms | ActiveRecord: 0.3ms) +  (0.3ms) ROLLBACK +  (0.3ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-12 15:03:31 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.6ms) +Completed 200 OK in 4ms (Views: 3.0ms | ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "making a new one"], ["created_at", "2019-04-12 22:03:31.441114"], ["updated_at", "2019-04-12 22:03:31.441114"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started PATCH "/tasks/980190965" for 127.0.0.1 at 2019-04-12 15:03:31 -0700 +Processing by TasksController#update as HTML + Parameters: {"task"=>{"name"=>"not new"}, "id"=>"980190965"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] +  (0.2ms) SAVEPOINT active_record_1 + Task Update (0.6ms) UPDATE "tasks" SET "name" = $1, "description" = $2, "updated_at" = $3 WHERE "tasks"."id" = $4 [["name", "not new"], ["description", nil], ["updated_at", "2019-04-12 22:03:31.447957"], ["id", 980190965]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks/980190965 +Completed 302 Found in 6ms (ActiveRecord: 1.4ms) + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +Started PATCH "/tasks/55" for 127.0.0.1 at 2019-04-12 15:03:31 -0700 +Processing by TasksController#update as HTML + Parameters: {"id"=>"55"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 55], ["LIMIT", 1]] +Completed 404 Not Found in 1ms (ActiveRecord: 0.3ms) +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-12 22:03:31.460145"], ["updated_at", "2019-04-12 22:03:31.460145"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190966" for 127.0.0.1 at 2019-04-12 15:03:31 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190966"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190966], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.6ms) +Completed 200 OK in 6ms (Views: 3.0ms | ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-12 15:03:31 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-12 15:03:31 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.3ms) +  (1.0ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-12 22:03:31.484587"], ["updated_at", "2019-04-12 22:03:31.484587"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190967/edit" for 127.0.0.1 at 2019-04-12 15:03:31 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190967"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (1.3ms) + Rendered tasks/edit.html.erb within layouts/application (1.9ms) +Completed 200 OK in 5ms (Views: 3.2ms | ActiveRecord: 0.2ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.1ms) ROLLBACK +  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) BEGIN +  (0.5ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.2ms) BEGIN + Fixtures Load (1.0ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-12 22:05:52.354007', '2019-04-12 22:05:52.354007'), (298486374, 'MyString', 'MyString', NULL, '2019-04-12 22:05:52.354007', '2019-04-12 22:05:52.354007') +  (0.9ms) COMMIT +  (0.1ms) BEGIN +  (0.3ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.2ms) COMMIT +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-12 22:05:52.395469"], ["updated_at", "2019-04-12 22:05:52.395469"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190963/edit" for 127.0.0.1 at 2019-04-12 15:05:52 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190963"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (5.7ms) + Rendered tasks/edit.html.erb within layouts/application (7.2ms) +Completed 200 OK in 143ms (Views: 134.7ms | ActiveRecord: 0.5ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-12 15:05:52 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.2ms) ROLLBACK +  (0.3ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-12 15:05:52 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (1.8ms) + Rendered tasks/new.html.erb within layouts/application (2.6ms) +Completed 200 OK in 6ms (Views: 4.6ms | ActiveRecord: 0.0ms) +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-12 22:05:52.571959"], ["updated_at", "2019-04-12 22:05:52.571959"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190964" for 127.0.0.1 at 2019-04-12 15:05:52 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190964"} + Task Load (0.7ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190964], ["LIMIT", 1]] +  (0.2ms) SAVEPOINT active_record_1 + Task Destroy (0.3ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190964]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 4ms (ActiveRecord: 1.5ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."description" = $1 LIMIT $2 [["description", "Read one book per week"], ["LIMIT", 1]] +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-12 15:05:52 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-12 22:05:52.595732"], ["updated_at", "2019-04-12 22:05:52.595732"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 0.8ms) +  (0.4ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +Started PATCH "/tasks/55" for 127.0.0.1 at 2019-04-12 15:05:52 -0700 +Processing by TasksController#update as HTML + Parameters: {"id"=>"55"} +Redirected to http://www.example.com/tasks + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 55], ["LIMIT", 1]] +Completed 404 Not Found in 2ms (ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.3ms) SAVEPOINT active_record_1 + Task Create (0.6ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "making a new one"], ["created_at", "2019-04-12 22:05:52.611625"], ["updated_at", "2019-04-12 22:05:52.611625"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started PATCH "/tasks/980190966" for 127.0.0.1 at 2019-04-12 15:05:52 -0700 +Processing by TasksController#update as HTML + Parameters: {"task"=>{"name"=>"not new"}, "id"=>"980190966"} +Redirected to http://www.example.com/tasks + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190966], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Task Update (0.3ms) UPDATE "tasks" SET "name" = $1, "description" = $2, "updated_at" = $3 WHERE "tasks"."id" = $4 [["name", "not new"], ["description", nil], ["updated_at", "2019-04-12 22:05:52.618598"], ["id", 980190966]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to +Completed 500 Internal Server Error in 4ms (ActiveRecord: 1.0ms) +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-12 15:05:52 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.7ms) +Completed 200 OK in 5ms (Views: 3.3ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-12 15:05:52 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.5ms) +Completed 200 OK in 4ms (Views: 3.2ms | ActiveRecord: 0.4ms) +  (1.7ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-12 15:05:52 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.3ms) +  (0.4ms) ROLLBACK +  (0.2ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.4ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-12 22:05:52.657947"], ["updated_at", "2019-04-12 22:05:52.657947"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190967" for 127.0.0.1 at 2019-04-12 15:05:52 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190967"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.9ms) +Completed 200 OK in 6ms (Views: 3.1ms | ActiveRecord: 0.3ms) +  (0.4ms) ROLLBACK +  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.1ms) BEGIN +  (0.4ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.2ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.9ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-12 22:07:51.683592', '2019-04-12 22:07:51.683592'), (298486374, 'MyString', 'MyString', NULL, '2019-04-12 22:07:51.683592', '2019-04-12 22:07:51.683592') +  (1.1ms) COMMIT +  (0.1ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +Started PATCH "/tasks/55" for 127.0.0.1 at 2019-04-12 15:07:51 -0700 +Processing by TasksController#update as HTML + Parameters: {"id"=>"55"} +Redirected to http://www.example.com/tasks + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 55], ["LIMIT", 1]] +Completed 404 Not Found in 7ms (ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.4ms) SAVEPOINT active_record_1 + Task Create (0.5ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "making a new one"], ["created_at", "2019-04-12 22:07:51.727889"], ["updated_at", "2019-04-12 22:07:51.727889"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started PATCH "/tasks/980190963" for 127.0.0.1 at 2019-04-12 15:07:51 -0700 +Processing by TasksController#update as HTML + Parameters: {"task"=>{"name"=>"not new"}, "id"=>"980190963"} +Redirected to http://www.example.com/tasks + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Task Update (0.3ms) UPDATE "tasks" SET "name" = $1, "description" = $2, "updated_at" = $3 WHERE "tasks"."id" = $4 [["name", "not new"], ["description", nil], ["updated_at", "2019-04-12 22:07:51.734086"], ["id", 980190963]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to +Completed 500 Internal Server Error in 4ms (ActiveRecord: 0.9ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-12 15:07:51 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (7.1ms) + Rendered tasks/new.html.erb within layouts/application (9.1ms) +Completed 200 OK in 239ms (Views: 237.4ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-12 22:07:51.985905"], ["updated_at", "2019-04-12 22:07:51.985905"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190964" for 127.0.0.1 at 2019-04-12 15:07:51 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190964"} + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190964], ["LIMIT", 1]] +  (0.2ms) SAVEPOINT active_record_1 + Task Destroy (0.4ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190964]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 4ms (ActiveRecord: 1.2ms) +  (0.6ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."description" = $1 LIMIT $2 [["description", "Read one book per week"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-12 22:07:52.003004"], ["updated_at", "2019-04-12 22:07:52.003004"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190965/edit" for 127.0.0.1 at 2019-04-12 15:07:52 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190965"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (1.4ms) + Rendered tasks/edit.html.erb within layouts/application (2.0ms) +Completed 200 OK in 6ms (Views: 3.4ms | ActiveRecord: 0.3ms) +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-12 15:07:52 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-12 15:07:52 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.8ms) +Completed 200 OK in 4ms (Views: 2.7ms | ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-12 15:07:52 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.0ms) +Completed 200 OK in 4ms (Views: 3.1ms | ActiveRecord: 0.4ms) +  (0.4ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-12 15:07:52 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.3ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-12 22:07:52.040798"], ["updated_at", "2019-04-12 22:07:52.040798"]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 0.9ms) +  (0.4ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.3ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-12 22:07:52.050114"], ["updated_at", "2019-04-12 22:07:52.050114"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190967" for 127.0.0.1 at 2019-04-12 15:07:52 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190967"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.4ms) +Completed 200 OK in 4ms (Views: 1.9ms | ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-12 15:07:52 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.2ms) +  (0.2ms) ROLLBACK +  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.1ms) BEGIN +  (0.3ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.5ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-12 22:08:04.946053', '2019-04-12 22:08:04.946053'), (298486374, 'MyString', 'MyString', NULL, '2019-04-12 22:08:04.946053', '2019-04-12 22:08:04.946053') +  (1.1ms) COMMIT +  (0.2ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-12 15:08:04 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (9.6ms) +Completed 200 OK in 242ms (Views: 234.6ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-12 15:08:05 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.6ms) +Completed 200 OK in 4ms (Views: 3.0ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.3ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.4ms) SAVEPOINT active_record_1 + Task Create (0.5ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "making a new one"], ["created_at", "2019-04-12 22:08:05.225984"], ["updated_at", "2019-04-12 22:08:05.225984"]] +  (0.4ms) RELEASE SAVEPOINT active_record_1 +Started PATCH "/tasks/980190963" for 127.0.0.1 at 2019-04-12 15:08:05 -0700 +Processing by TasksController#update as HTML + Parameters: {"task"=>{"name"=>"not new"}, "id"=>"980190963"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Task Update (0.4ms) UPDATE "tasks" SET "name" = $1, "description" = $2, "updated_at" = $3 WHERE "tasks"."id" = $4 [["name", "not new"], ["description", nil], ["updated_at", "2019-04-12 22:08:05.238848"], ["id", 980190963]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks/980190963 +Completed 302 Found in 7ms (ActiveRecord: 1.4ms) + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +Started PATCH "/tasks/55" for 127.0.0.1 at 2019-04-12 15:08:05 -0700 +Processing by TasksController#update as HTML + Parameters: {"id"=>"55"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 55], ["LIMIT", 1]] +Completed 404 Not Found in 1ms (ActiveRecord: 0.3ms) +  (0.1ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.6ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-12 22:08:05.251551"], ["updated_at", "2019-04-12 22:08:05.251551"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190964" for 127.0.0.1 at 2019-04-12 15:08:05 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190964"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190964], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Task Destroy (0.2ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190964]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 0.8ms) +  (0.2ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."description" = $1 LIMIT $2 [["description", "Read one book per week"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-12 22:08:05.265754"], ["updated_at", "2019-04-12 22:08:05.265754"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190965/edit" for 127.0.0.1 at 2019-04-12 15:08:05 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190965"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (5.8ms) + Rendered tasks/edit.html.erb within layouts/application (7.5ms) +Completed 200 OK in 12ms (Views: 9.8ms | ActiveRecord: 0.4ms) +  (0.4ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-12 15:08:05 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.4ms) +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-12 22:08:05.293366"], ["updated_at", "2019-04-12 22:08:05.293366"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190966" for 127.0.0.1 at 2019-04-12 15:08:05 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190966"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190966], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.6ms) +Completed 200 OK in 4ms (Views: 2.3ms | ActiveRecord: 0.2ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-12 15:08:05 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (1.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 4ms (ActiveRecord: 1.4ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.4ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-12 15:08:05 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.5ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-12 22:08:05.316230"], ["updated_at", "2019-04-12 22:08:05.316230"]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 0.9ms) +  (0.5ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.5ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-12 15:08:05 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (1.3ms) + Rendered tasks/new.html.erb within layouts/application (1.9ms) +Completed 200 OK in 4ms (Views: 3.3ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.2ms) ROLLBACK +  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.1ms) BEGIN +  (0.3ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.9ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-12 22:09:42.386182', '2019-04-12 22:09:42.386182'), (298486374, 'MyString', 'MyString', NULL, '2019-04-12 22:09:42.386182', '2019-04-12 22:09:42.386182') +  (1.0ms) COMMIT +  (0.2ms) BEGIN +  (0.3ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "making a new one"], ["created_at", "2019-04-12 22:09:42.411516"], ["updated_at", "2019-04-12 22:09:42.411516"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started PATCH "/tasks/980190963" for 127.0.0.1 at 2019-04-12 15:09:42 -0700 +Processing by TasksController#update as HTML + Parameters: {"task"=>{"name"=>"not new"}, "id"=>"980190963"} + Task Load (4.6ms) SELECT "tasks".* FROM "tasks" WHERE (980190963) LIMIT $1 [["LIMIT", 1]] +Completed 500 Internal Server Error in 10ms (ActiveRecord: 4.6ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +Started PATCH "/tasks/55" for 127.0.0.1 at 2019-04-12 15:09:42 -0700 +Processing by TasksController#update as HTML + Parameters: {"id"=>"55"} + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE (55) LIMIT $1 [["LIMIT", 1]] +Completed 500 Internal Server Error in 1ms (ActiveRecord: 0.5ms) +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-12 22:09:42.441598"], ["updated_at", "2019-04-12 22:09:42.441598"]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190964/edit" for 127.0.0.1 at 2019-04-12 15:09:42 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190964"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190964], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (6.6ms) + Rendered tasks/edit.html.erb within layouts/application (8.8ms) +Completed 200 OK in 246ms (Views: 241.0ms | ActiveRecord: 0.7ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-12 15:09:42 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-12 15:09:42 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (2.1ms) + Rendered tasks/new.html.erb within layouts/application (2.8ms) +Completed 200 OK in 7ms (Views: 5.1ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-12 22:09:42.717451"], ["updated_at", "2019-04-12 22:09:42.717451"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190965" for 127.0.0.1 at 2019-04-12 15:09:42 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190965"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.5ms) +Completed 200 OK in 5ms (Views: 1.9ms | ActiveRecord: 0.4ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-12 15:09:42 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.3ms) +  (0.4ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-12 15:09:42 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (1.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (4.1ms) +Completed 200 OK in 7ms (Views: 4.7ms | ActiveRecord: 1.4ms) +  (0.4ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-12 15:09:42 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.8ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.4ms) +Completed 200 OK in 5ms (Views: 3.3ms | ActiveRecord: 0.8ms) +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.3ms) SAVEPOINT active_record_1 + Task Create (0.5ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-12 22:09:42.757559"], ["updated_at", "2019-04-12 22:09:42.757559"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190966" for 127.0.0.1 at 2019-04-12 15:09:42 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190966"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190966], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Task Destroy (0.3ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190966]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 0.9ms) +  (0.6ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."description" = $1 LIMIT $2 [["description", "Read one book per week"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.7ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-12 15:09:42 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-12 22:09:42.775844"], ["updated_at", "2019-04-12 22:09:42.775844"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.6ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.1ms) BEGIN +  (0.3ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.5ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-12 22:11:33.351590', '2019-04-12 22:11:33.351590'), (298486374, 'MyString', 'MyString', NULL, '2019-04-12 22:11:33.351590', '2019-04-12 22:11:33.351590') +  (1.0ms) COMMIT +  (0.2ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-12 15:11:33 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (9.7ms) +Completed 200 OK in 247ms (Views: 240.1ms | ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-12 15:11:33 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.6ms) +Completed 200 OK in 4ms (Views: 3.0ms | ActiveRecord: 0.3ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.4ms) SAVEPOINT active_record_1 + Task Create (0.5ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "making a new one"], ["created_at", "2019-04-12 22:11:33.635649"], ["updated_at", "2019-04-12 22:11:33.635649"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started PATCH "/tasks/980190963" for 127.0.0.1 at 2019-04-12 15:11:33 -0700 +Processing by TasksController#update as HTML + Parameters: {"task"=>{"name"=>"not new"}, "id"=>"980190963"} + Task Load (0.8ms) SELECT "tasks".* FROM "tasks" WHERE (980190963) LIMIT $1 [["LIMIT", 1]] +Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.8ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +Started PATCH "/tasks/55" for 127.0.0.1 at 2019-04-12 15:11:33 -0700 +Processing by TasksController#update as HTML + Parameters: {"id"=>"55"} + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE (55) LIMIT $1 [["LIMIT", 1]] +Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.5ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.6ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-12 15:11:33 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-12 22:11:33.661944"], ["updated_at", "2019-04-12 22:11:33.661944"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 0.6ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-12 15:11:33 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (7.8ms) + Rendered tasks/new.html.erb within layouts/application (9.3ms) +Completed 200 OK in 12ms (Views: 11.0ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-12 22:11:33.687847"], ["updated_at", "2019-04-12 22:11:33.687847"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190965" for 127.0.0.1 at 2019-04-12 15:11:33 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190965"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Task Destroy (0.5ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190965]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 5ms (ActiveRecord: 1.2ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."description" = $1 LIMIT $2 [["description", "Read one book per week"], ["LIMIT", 1]] +  (0.4ms) ROLLBACK +  (0.2ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-12 22:11:33.703755"], ["updated_at", "2019-04-12 22:11:33.703755"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190966" for 127.0.0.1 at 2019-04-12 15:11:33 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190966"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190966], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.7ms) +Completed 200 OK in 6ms (Views: 3.0ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-12 15:11:33 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.7ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 0.7ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-12 15:11:33 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.5ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-12 22:11:33.730379"], ["updated_at", "2019-04-12 22:11:33.730379"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190967/edit" for 127.0.0.1 at 2019-04-12 15:11:33 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190967"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (1.7ms) + Rendered tasks/edit.html.erb within layouts/application (2.4ms) +Completed 200 OK in 7ms (Views: 4.5ms | ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.3ms) ROLLBACK +  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) BEGIN +  (0.3ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.5ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-12 22:12:18.407554', '2019-04-12 22:12:18.407554'), (298486374, 'MyString', 'MyString', NULL, '2019-04-12 22:12:18.407554', '2019-04-12 22:12:18.407554') +  (1.1ms) COMMIT +  (0.2ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.5ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-12 22:12:18.430614"], ["updated_at", "2019-04-12 22:12:18.430614"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190963/edit" for 127.0.0.1 at 2019-04-12 15:12:18 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190963"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (5.7ms) + Rendered tasks/edit.html.erb within layouts/application (7.0ms) +Completed 200 OK in 239ms (Views: 227.9ms | ActiveRecord: 0.6ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-12 15:12:18 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.3ms) +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.3ms) SAVEPOINT active_record_1 + Task Create (0.5ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-12 22:12:18.693869"], ["updated_at", "2019-04-12 22:12:18.693869"]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190964" for 127.0.0.1 at 2019-04-12 15:12:18 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190964"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190964], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (1.0ms) +Completed 200 OK in 6ms (Views: 4.0ms | ActiveRecord: 0.3ms) +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-12 15:12:18 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-12 15:12:18 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (2.0ms) + Rendered tasks/new.html.erb within layouts/application (2.8ms) +Completed 200 OK in 7ms (Views: 5.8ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.3ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "making a new one"], ["created_at", "2019-04-12 22:12:18.727087"], ["updated_at", "2019-04-12 22:12:18.727087"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started PATCH "/tasks/980190965" for 127.0.0.1 at 2019-04-12 15:12:18 -0700 +Processing by TasksController#update as HTML + Parameters: {"task"=>{"name"=>"not new"}, "id"=>"980190965"} + Task Load (1.2ms) SELECT "tasks".* FROM "tasks" WHERE (980190965) LIMIT $1 [["LIMIT", 1]] +Completed 500 Internal Server Error in 3ms (ActiveRecord: 1.2ms) +  (0.4ms) ROLLBACK +  (0.2ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +Started PATCH "/tasks/55" for 127.0.0.1 at 2019-04-12 15:12:18 -0700 +Processing by TasksController#update as HTML + Parameters: {"id"=>"55"} + Task Load (0.8ms) SELECT "tasks".* FROM "tasks" WHERE (55) LIMIT $1 [["LIMIT", 1]] +Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.8ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-12 22:12:18.750901"], ["updated_at", "2019-04-12 22:12:18.750901"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190966" for 127.0.0.1 at 2019-04-12 15:12:18 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190966"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190966], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Task Destroy (0.2ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190966]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.8ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."description" = $1 LIMIT $2 [["description", "Read one book per week"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-12 15:12:18 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.6ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (3.2ms) +Completed 200 OK in 7ms (Views: 5.1ms | ActiveRecord: 0.6ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-12 15:12:18 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.7ms) +Completed 200 OK in 4ms (Views: 2.9ms | ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.4ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-12 15:12:18 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.2ms) SAVEPOINT active_record_1 + Task Create (1.8ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-12 22:12:18.788874"], ["updated_at", "2019-04-12 22:12:18.788874"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 5ms (ActiveRecord: 2.2ms) +  (0.4ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.1ms) BEGIN +  (0.3ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.5ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-12 22:13:03.105902', '2019-04-12 22:13:03.105902'), (298486374, 'MyString', 'MyString', NULL, '2019-04-12 22:13:03.105902', '2019-04-12 22:13:03.105902') +  (1.1ms) COMMIT +  (0.2ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-12 22:13:03.129754"], ["updated_at", "2019-04-12 22:13:03.129754"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190963" for 127.0.0.1 at 2019-04-12 15:13:03 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190963"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (1.2ms) +Completed 200 OK in 216ms (Views: 206.1ms | ActiveRecord: 0.5ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-12 15:13:03 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "making a new one"], ["created_at", "2019-04-12 22:13:03.362726"], ["updated_at", "2019-04-12 22:13:03.362726"]] +  (0.4ms) RELEASE SAVEPOINT active_record_1 +Started PATCH "/tasks/980190964" for 127.0.0.1 at 2019-04-12 15:13:03 -0700 +Processing by TasksController#update as HTML + Parameters: {"task"=>{"name"=>"not new"}, "id"=>"980190964"} + Task Load (1.0ms) SELECT "tasks".* FROM "tasks" WHERE (980190964) LIMIT $1 [["LIMIT", 1]] +Completed 500 Internal Server Error in 2ms (ActiveRecord: 1.0ms) +  (0.2ms) ROLLBACK +  (0.3ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.4ms) ROLLBACK +  (0.2ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-12 15:13:03 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (8.4ms) + Rendered tasks/new.html.erb within layouts/application (9.4ms) +Completed 200 OK in 12ms (Views: 10.6ms | ActiveRecord: 0.0ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-12 22:13:03.488393"], ["updated_at", "2019-04-12 22:13:03.488393"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190965/edit" for 127.0.0.1 at 2019-04-12 15:13:03 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190965"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (3.0ms) + Rendered tasks/edit.html.erb within layouts/application (3.8ms) +Completed 200 OK in 7ms (Views: 5.7ms | ActiveRecord: 0.2ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-12 15:13:03 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-12 15:13:03 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.6ms) +Completed 200 OK in 4ms (Views: 3.0ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-12 15:13:03 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.0ms) +Completed 200 OK in 4ms (Views: 3.5ms | ActiveRecord: 0.5ms) +  (0.2ms) ROLLBACK +  (0.4ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-12 22:13:03.527515"], ["updated_at", "2019-04-12 22:13:03.527515"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190966" for 127.0.0.1 at 2019-04-12 15:13:03 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190966"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190966], ["LIMIT", 1]] +  (0.2ms) SAVEPOINT active_record_1 + Task Destroy (0.4ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190966]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 4ms (ActiveRecord: 1.3ms) +  (0.4ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."description" = $1 LIMIT $2 [["description", "Read one book per week"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-12 15:13:03 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.7ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-12 22:13:03.546367"], ["updated_at", "2019-04-12 22:13:03.546367"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 4ms (ActiveRecord: 1.1ms) +  (0.7ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.3ms) ROLLBACK +  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) BEGIN +  (0.4ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.2ms) BEGIN + Fixtures Load (1.0ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-12 22:13:22.677702', '2019-04-12 22:13:22.677702'), (298486374, 'MyString', 'MyString', NULL, '2019-04-12 22:13:22.677702', '2019-04-12 22:13:22.677702') +  (0.6ms) COMMIT +  (0.2ms) BEGIN +  (0.3ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.5ms) COMMIT +  (0.2ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.3ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-12 22:13:22.716303"], ["updated_at", "2019-04-12 22:13:22.716303"]] +  (1.5ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190963/edit" for 127.0.0.1 at 2019-04-12 15:13:22 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190963"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (17.0ms) + Rendered tasks/edit.html.erb within layouts/application (18.5ms) +Completed 200 OK in 202ms (Views: 190.0ms | ActiveRecord: 0.5ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-12 15:13:22 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.6ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-12 22:13:22.940551"], ["updated_at", "2019-04-12 22:13:22.940551"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.7ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190964" for 127.0.0.1 at 2019-04-12 15:13:22 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190964"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190964], ["LIMIT", 1]] +  (0.2ms) SAVEPOINT active_record_1 + Task Destroy (0.3ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190964]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 1.0ms) +  (0.4ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."description" = $1 LIMIT $2 [["description", "Read one book per week"], ["LIMIT", 1]] +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.3ms) ROLLBACK +  (0.5ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-12 15:13:22 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.7ms) +Completed 200 OK in 5ms (Views: 3.2ms | ActiveRecord: 0.3ms) +  (1.2ms) ROLLBACK +  (0.4ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-12 15:13:22 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.5ms) +Completed 200 OK in 5ms (Views: 3.8ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "making a new one"], ["created_at", "2019-04-12 22:13:22.985097"], ["updated_at", "2019-04-12 22:13:22.985097"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started PATCH "/tasks/980190965" for 127.0.0.1 at 2019-04-12 15:13:22 -0700 +Processing by TasksController#update as HTML + Parameters: {"task"=>{"name"=>"not new"}, "id"=>"980190965"} + Task Load (0.9ms) SELECT "tasks".* FROM "tasks" WHERE (980190965) LIMIT $1 [["LIMIT", 1]] +Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.9ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-12 15:13:23 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.2ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-12 22:13:23.095852"], ["updated_at", "2019-04-12 22:13:23.095852"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190966" for 127.0.0.1 at 2019-04-12 15:13:23 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190966"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190966], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.8ms) +Completed 200 OK in 5ms (Views: 2.9ms | ActiveRecord: 0.3ms) +  (0.4ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-12 15:13:23 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (2.0ms) + Rendered tasks/new.html.erb within layouts/application (2.8ms) +Completed 200 OK in 5ms (Views: 4.3ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-12 15:13:23 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.2ms) SAVEPOINT active_record_1 + Task Create (1.1ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-12 22:13:23.119372"], ["updated_at", "2019-04-12 22:13:23.119372"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 4ms (ActiveRecord: 1.5ms) +  (0.5ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.1ms) BEGIN +  (0.4ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.2ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.7ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-12 22:18:40.709377', '2019-04-12 22:18:40.709377'), (298486374, 'MyString', 'MyString', NULL, '2019-04-12 22:18:40.709377', '2019-04-12 22:18:40.709377') +  (0.9ms) COMMIT +  (0.1ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-12 15:18:40 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 21ms (ActiveRecord: 0.5ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-12 22:18:40.767569"], ["updated_at", "2019-04-12 22:18:40.767569"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190963" for 127.0.0.1 at 2019-04-12 15:18:40 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190963"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (1.3ms) +Completed 200 OK in 213ms (Views: 210.0ms | ActiveRecord: 0.4ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-12 15:18:40 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.3ms) +Completed 200 OK in 5ms (Views: 3.7ms | ActiveRecord: 0.3ms) +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-12 15:18:40 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.6ms) +Completed 200 OK in 4ms (Views: 3.0ms | ActiveRecord: 0.3ms) +  (0.4ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "making a new one"], ["created_at", "2019-04-12 22:18:41.006805"], ["updated_at", "2019-04-12 22:18:41.006805"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started PATCH "/tasks/980190964" for 127.0.0.1 at 2019-04-12 15:18:41 -0700 +Processing by TasksController#update as HTML + Parameters: {"task"=>{"name"=>"not new"}, "id"=>"980190964"} + Task Load (1.0ms) SELECT "tasks".* FROM "tasks" WHERE (980190964) LIMIT $1 [["LIMIT", 1]] +Completed 500 Internal Server Error in 2ms (ActiveRecord: 1.0ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +Started PATCH "/tasks/55" for 127.0.0.1 at 2019-04-12 15:18:41 -0700 +Processing by TasksController#update as HTML + Parameters: {"id"=>"55"} + Task Load (1.1ms) SELECT "tasks".* FROM "tasks" WHERE (55) LIMIT $1 [["LIMIT", 1]] +Completed 500 Internal Server Error in 2ms (ActiveRecord: 1.1ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.1ms) ROLLBACK +  (0.3ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.7ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-12 15:18:41 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.8ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-12 22:18:41.034849"], ["updated_at", "2019-04-12 22:18:41.034849"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 4ms (ActiveRecord: 1.3ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.5ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-12 22:18:41.043023"], ["updated_at", "2019-04-12 22:18:41.043023"]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190966/edit" for 127.0.0.1 at 2019-04-12 15:18:41 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190966"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190966], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (6.6ms) + Rendered tasks/edit.html.erb within layouts/application (7.6ms) +Completed 200 OK in 11ms (Views: 9.2ms | ActiveRecord: 0.4ms) +  (0.5ms) ROLLBACK +  (0.7ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-12 15:18:41 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.3ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-12 22:18:41.068730"], ["updated_at", "2019-04-12 22:18:41.068730"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190967" for 127.0.0.1 at 2019-04-12 15:18:41 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190967"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Task Destroy (0.3ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190967]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 0.8ms) +  (0.5ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."description" = $1 LIMIT $2 [["description", "Read one book per week"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-12 15:18:41 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (1.4ms) + Rendered tasks/new.html.erb within layouts/application (2.2ms) +Completed 200 OK in 5ms (Views: 3.7ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) BEGIN +  (0.3ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.7ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-12 22:21:18.133738', '2019-04-12 22:21:18.133738'), (298486374, 'MyString', 'MyString', NULL, '2019-04-12 22:21:18.133738', '2019-04-12 22:21:18.133738') +  (0.7ms) COMMIT +  (0.1ms) BEGIN +  (0.1ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.2ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.5ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-12 15:21:18 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-12 22:21:18.171245"], ["updated_at", "2019-04-12 22:21:18.171245"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 13ms (ActiveRecord: 0.6ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.2ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "making a new one"], ["created_at", "2019-04-12 22:21:18.180933"], ["updated_at", "2019-04-12 22:21:18.180933"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started PATCH "/tasks/980190964" for 127.0.0.1 at 2019-04-12 15:21:18 -0700 +Processing by TasksController#update as HTML + Parameters: {"task"=>{"name"=>"not new"}, "id"=>"980190964"} + Task Load (1.2ms) SELECT "tasks".* FROM "tasks" WHERE (980190964) LIMIT $1 [["LIMIT", 1]] +Completed 500 Internal Server Error in 5ms (ActiveRecord: 1.2ms) +  (0.2ms) ROLLBACK +  (1.0ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +Started PATCH "/tasks/55" for 127.0.0.1 at 2019-04-12 15:21:18 -0700 +Processing by TasksController#update as HTML + Parameters: {"id"=>"55"} + Task Load (1.3ms) SELECT "tasks".* FROM "tasks" WHERE (55) LIMIT $1 [["LIMIT", 1]] +Completed 500 Internal Server Error in 2ms (ActiveRecord: 1.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-12 22:21:18.209304"], ["updated_at", "2019-04-12 22:21:18.209304"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190965" for 127.0.0.1 at 2019-04-12 15:21:18 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190965"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (2.4ms) +Completed 200 OK in 207ms (Views: 202.6ms | ActiveRecord: 0.2ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-12 15:21:18 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-12 22:21:18.430885"], ["updated_at", "2019-04-12 22:21:18.430885"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190966/edit" for 127.0.0.1 at 2019-04-12 15:21:18 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190966"} + Task Load (0.6ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190966], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (6.9ms) + Rendered tasks/edit.html.erb within layouts/application (8.5ms) +Completed 200 OK in 13ms (Views: 10.0ms | ActiveRecord: 0.6ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-12 15:21:18 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-12 22:21:18.458358"], ["updated_at", "2019-04-12 22:21:18.458358"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190967" for 127.0.0.1 at 2019-04-12 15:21:18 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190967"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Task Destroy (0.3ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190967]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 0.8ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."description" = $1 LIMIT $2 [["description", "Read one book per week"], ["LIMIT", 1]] +  (0.4ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.2ms) ROLLBACK +  (1.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-12 15:21:18 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (1.4ms) + Rendered tasks/new.html.erb within layouts/application (2.2ms) +Completed 200 OK in 5ms (Views: 3.8ms | ActiveRecord: 0.0ms) +  (0.3ms) ROLLBACK +  (0.3ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-12 15:21:18 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.2ms) +Completed 200 OK in 6ms (Views: 3.4ms | ActiveRecord: 0.5ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-12 15:21:18 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.1ms) +Completed 200 OK in 3ms (Views: 2.7ms | ActiveRecord: 0.3ms) +  (0.3ms) ROLLBACK +  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) BEGIN +  (0.3ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.5ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-12 22:24:14.807026', '2019-04-12 22:24:14.807026'), (298486374, 'MyString', 'MyString', NULL, '2019-04-12 22:24:14.807026', '2019-04-12 22:24:14.807026') +  (1.0ms) COMMIT +  (0.2ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.2ms) COMMIT +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-12 15:24:14 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 10ms (ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.5ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-12 22:24:14.872518"], ["updated_at", "2019-04-12 22:24:14.872518"]] +  (1.6ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190963" for 127.0.0.1 at 2019-04-12 15:24:14 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190963"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (2.4ms) +Completed 200 OK in 159ms (Views: 156.5ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-12 15:24:15 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (9.3ms) + Rendered tasks/new.html.erb within layouts/application (10.7ms) +Completed 200 OK in 14ms (Views: 12.6ms | ActiveRecord: 0.0ms) +  (0.5ms) ROLLBACK +  (0.2ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +Started PATCH "/tasks/55" for 127.0.0.1 at 2019-04-12 15:24:15 -0700 +Processing by TasksController#update as HTML + Parameters: {"id"=>"55"} + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 55], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 500 Internal Server Error in 3ms (ActiveRecord: 0.5ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "making a new one"], ["created_at", "2019-04-12 22:24:15.072070"], ["updated_at", "2019-04-12 22:24:15.072070"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started PATCH "/tasks/980190964" for 127.0.0.1 at 2019-04-12 15:24:15 -0700 +Processing by TasksController#update as HTML + Parameters: {"task"=>{"name"=>"not new"}, "id"=>"980190964"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190964], ["LIMIT", 1]] +  (0.2ms) SAVEPOINT active_record_1 + Task Update (0.6ms) UPDATE "tasks" SET "name" = $1, "description" = $2, "updated_at" = $3 WHERE "tasks"."id" = $4 [["name", "not new"], ["description", nil], ["updated_at", "2019-04-12 22:24:15.078028"], ["id", 980190964]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks/980190964 +Completed 302 Found in 5ms (ActiveRecord: 1.4ms) + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190964], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-12 22:24:15.085385"], ["updated_at", "2019-04-12 22:24:15.085385"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190965/edit" for 127.0.0.1 at 2019-04-12 15:24:15 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190965"} + Task Load (0.7ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (1.7ms) + Rendered tasks/edit.html.erb within layouts/application (2.7ms) +Completed 200 OK in 8ms (Views: 4.7ms | ActiveRecord: 0.7ms) +  (0.4ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-12 15:24:15 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-12 15:24:15 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.8ms) +Completed 200 OK in 7ms (Views: 5.3ms | ActiveRecord: 0.3ms) +  (0.4ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-12 15:24:15 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.6ms) +Completed 200 OK in 3ms (Views: 2.6ms | ActiveRecord: 0.5ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.5ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-12 15:24:15 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.5ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-12 22:24:15.135535"], ["updated_at", "2019-04-12 22:24:15.135535"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 0.8ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.4ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-12 22:24:15.143524"], ["updated_at", "2019-04-12 22:24:15.143524"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190967" for 127.0.0.1 at 2019-04-12 15:24:15 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190967"} + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Task Destroy (0.3ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190967]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 4ms (ActiveRecord: 1.1ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."description" = $1 LIMIT $2 [["description", "Read one book per week"], ["LIMIT", 1]] +  (0.1ms) ROLLBACK +  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) BEGIN +  (0.5ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.7ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-12 22:24:49.688360', '2019-04-12 22:24:49.688360'), (298486374, 'MyString', 'MyString', NULL, '2019-04-12 22:24:49.688360', '2019-04-12 22:24:49.688360') +  (0.8ms) COMMIT +  (0.2ms) BEGIN +  (0.3ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.2ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-12 22:24:49.715704"], ["updated_at", "2019-04-12 22:24:49.715704"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190963" for 127.0.0.1 at 2019-04-12 15:24:49 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190963"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Task Destroy (0.2ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190963]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 9ms (ActiveRecord: 1.0ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."description" = $1 LIMIT $2 [["description", "Read one book per week"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.2ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-12 22:24:49.743475"], ["updated_at", "2019-04-12 22:24:49.743475"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190964" for 127.0.0.1 at 2019-04-12 15:24:49 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190964"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190964], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.8ms) +Completed 200 OK in 212ms (Views: 208.5ms | ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-12 15:24:49 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.9ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-12 22:24:49.967108"], ["updated_at", "2019-04-12 22:24:49.967108"]] +  (0.4ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190965/edit" for 127.0.0.1 at 2019-04-12 15:24:49 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190965"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (6.7ms) + Rendered tasks/edit.html.erb within layouts/application (8.3ms) +Completed 200 OK in 13ms (Views: 10.5ms | ActiveRecord: 0.4ms) +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-12 15:24:49 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.6ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.6ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.2ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-12 15:24:49 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-12 22:24:49.998150"], ["updated_at", "2019-04-12 22:24:49.998150"]] +  (0.4ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 0.8ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-12 15:24:50 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (1.1ms) + Rendered tasks/new.html.erb within layouts/application (1.6ms) +Completed 200 OK in 4ms (Views: 3.2ms | ActiveRecord: 0.0ms) +  (0.4ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-12 15:24:50 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (3.1ms) +Completed 200 OK in 7ms (Views: 5.3ms | ActiveRecord: 0.5ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-12 15:24:50 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.7ms) +Completed 200 OK in 4ms (Views: 3.2ms | ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +Started PATCH "/tasks/55" for 127.0.0.1 at 2019-04-12 15:24:50 -0700 +Processing by TasksController#update as HTML + Parameters: {"id"=>"55"} + Task Load (0.6ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 55], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 500 Internal Server Error in 4ms (ActiveRecord: 0.6ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "making a new one"], ["created_at", "2019-04-12 22:24:50.046669"], ["updated_at", "2019-04-12 22:24:50.046669"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started PATCH "/tasks/980190967" for 127.0.0.1 at 2019-04-12 15:24:50 -0700 +Processing by TasksController#update as HTML + Parameters: {"task"=>{"name"=>"not new"}, "id"=>"980190967"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] +Completed 500 Internal Server Error in 3ms (ActiveRecord: 0.2ms) +  (0.3ms) ROLLBACK +  (0.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) BEGIN +  (0.3ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.6ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-12 22:25:00.615395', '2019-04-12 22:25:00.615395'), (298486374, 'MyString', 'MyString', NULL, '2019-04-12 22:25:00.615395', '2019-04-12 22:25:00.615395') +  (1.2ms) COMMIT +  (0.2ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.6ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-12 15:25:00 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (8.9ms) +Completed 200 OK in 208ms (Views: 199.5ms | ActiveRecord: 0.5ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-12 15:25:00 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.6ms) +Completed 200 OK in 4ms (Views: 2.9ms | ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (1.1ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "making a new one"], ["created_at", "2019-04-12 22:25:00.894332"], ["updated_at", "2019-04-12 22:25:00.894332"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started PATCH "/tasks/980190963" for 127.0.0.1 at 2019-04-12 15:25:00 -0700 +Processing by TasksController#update as HTML + Parameters: {"task"=>{"name"=>"not new"}, "id"=>"980190963"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] +  (0.2ms) SAVEPOINT active_record_1 + Task Update (0.6ms) UPDATE "tasks" SET "name" = $1, "description" = $2, "updated_at" = $3 WHERE "tasks"."id" = $4 [["name", "not new"], ["description", nil], ["updated_at", "2019-04-12 22:25:00.909661"], ["id", 980190963]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks/980190963 +Completed 302 Found in 8ms (ActiveRecord: 1.6ms) + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +Started PATCH "/tasks/55" for 127.0.0.1 at 2019-04-12 15:25:00 -0700 +Processing by TasksController#update as HTML + Parameters: {"id"=>"55"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 55], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 500 Internal Server Error in 3ms (ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.3ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.5ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-12 15:25:00 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-12 22:25:00.929444"], ["updated_at", "2019-04-12 22:25:00.929444"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 0.7ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.4ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.3ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-12 22:25:00.939292"], ["updated_at", "2019-04-12 22:25:00.939292"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190965/edit" for 127.0.0.1 at 2019-04-12 15:25:00 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190965"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (8.4ms) + Rendered tasks/edit.html.erb within layouts/application (9.6ms) +Completed 200 OK in 14ms (Views: 11.6ms | ActiveRecord: 0.4ms) +  (0.4ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-12 15:25:00 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-12 22:25:00.966101"], ["updated_at", "2019-04-12 22:25:00.966101"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190966" for 127.0.0.1 at 2019-04-12 15:25:00 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190966"} + Task Load (0.6ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190966], ["LIMIT", 1]] +  (0.3ms) SAVEPOINT active_record_1 + Task Destroy (0.5ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190966]] +  (0.4ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 6ms (ActiveRecord: 1.8ms) +  (0.4ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."description" = $1 LIMIT $2 [["description", "Read one book per week"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-12 22:25:00.983176"], ["updated_at", "2019-04-12 22:25:00.983176"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190967" for 127.0.0.1 at 2019-04-12 15:25:00 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190967"} + Task Load (0.6ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.6ms) +Completed 200 OK in 6ms (Views: 3.2ms | ActiveRecord: 0.6ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-12 15:25:00 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.2ms) +  (0.1ms) ROLLBACK +  (0.2ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-12 15:25:01 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (3.1ms) + Rendered tasks/new.html.erb within layouts/application (4.1ms) +Completed 200 OK in 8ms (Views: 6.4ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.1ms) BEGIN +  (0.3ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.7ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-12 22:29:02.401746', '2019-04-12 22:29:02.401746'), (298486374, 'MyString', 'MyString', NULL, '2019-04-12 22:29:02.401746', '2019-04-12 22:29:02.401746') +  (0.7ms) COMMIT +  (0.1ms) BEGIN +  (0.1ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-12 15:29:02 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (8.6ms) +Completed 200 OK in 230ms (Views: 211.1ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-12 15:29:02 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.5ms) +Completed 200 OK in 4ms (Views: 2.8ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.6ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.5ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-12 22:29:02.670954"], ["updated_at", "2019-04-12 22:29:02.670954"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190963" for 127.0.0.1 at 2019-04-12 15:29:02 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190963"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.6ms) +Completed 200 OK in 6ms (Views: 2.4ms | ActiveRecord: 0.5ms) +  (0.4ms) ROLLBACK +  (0.5ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-12 15:29:02 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-12 15:29:02 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.3ms) +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.9ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-12 22:29:02.698799"], ["updated_at", "2019-04-12 22:29:02.698799"]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190964/edit" for 127.0.0.1 at 2019-04-12 15:29:02 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190964"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190964], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (7.5ms) + Rendered tasks/edit.html.erb within layouts/application (9.8ms) +Completed 200 OK in 16ms (Views: 13.2ms | ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.6ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.5ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-12 15:29:02 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-12 22:29:02.730859"], ["updated_at", "2019-04-12 22:29:02.730859"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 0.6ms) +  (0.6ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.4ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.3ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-12 22:29:02.742766"], ["updated_at", "2019-04-12 22:29:02.742766"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190966" for 127.0.0.1 at 2019-04-12 15:29:02 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190966"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190966], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Task Destroy (0.3ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190966]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 0.8ms) +  (0.5ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."description" = $1 LIMIT $2 [["description", "Read one book per week"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.2ms) ROLLBACK +  (0.3ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-12 15:29:02 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (1.2ms) + Rendered tasks/new.html.erb within layouts/application (1.8ms) +Completed 200 OK in 5ms (Views: 3.5ms | ActiveRecord: 0.0ms) +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +Started PATCH "/tasks/55" for 127.0.0.1 at 2019-04-12 15:29:02 -0700 +Processing by TasksController#update as HTML + Parameters: {"id"=>"55"} + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 55], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.5ms) +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "making a new one"], ["created_at", "2019-04-12 22:29:02.777580"], ["updated_at", "2019-04-12 22:29:02.777580"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started PATCH "/tasks/980190967" for 127.0.0.1 at 2019-04-12 15:29:02 -0700 +Processing by TasksController#update as HTML + Parameters: {"task"=>{"name"=>"not new"}, "id"=>"980190967"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] +  (0.2ms) SAVEPOINT active_record_1 + Task Update (0.5ms) UPDATE "tasks" SET "name" = $1, "description" = $2, "updated_at" = $3 WHERE "tasks"."id" = $4 [["name", "not new"], ["description", nil], ["updated_at", "2019-04-12 22:29:02.781932"], ["id", 980190967]] +  (0.5ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks/980190967 +Completed 302 Found in 5ms (ActiveRecord: 1.4ms) + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] +  (0.2ms) ROLLBACK diff --git a/test/controllers/tasks_controller_test.rb b/test/controllers/tasks_controller_test.rb index 06f606c2b..ff8031d79 100644 --- a/test/controllers/tasks_controller_test.rb +++ b/test/controllers/tasks_controller_test.rb @@ -5,7 +5,7 @@ # you may need to modify this. let (:task) { Task.create name: "sample task", description: "this is an example for a test", - completion_date: 2010-03-02 + completion_date: 2010 - 03 - 02 } # Tests for Wave 1 @@ -30,7 +30,7 @@ # Unskip these tests for Wave 2 describe "show" do it "can get a valid task" do - + # Act get task_path(task.id) @@ -39,7 +39,7 @@ end it "will redirect for an invalid task" do - + # Act get task_path(-1) @@ -50,7 +50,6 @@ describe "new" do it "can get the new task page" do - # Act get new_task_path @@ -62,7 +61,6 @@ describe "create" do it "can create a new task" do - # Arrange # Note to students: Your Task model **may** be different and @@ -85,7 +83,7 @@ expect(new_task.completion_date).must_equal task_hash[:task][:completion_date] must_respond_with :redirect - must_redirect_to task_path(new_task.id) + must_redirect_to tasks_path end end @@ -108,7 +106,6 @@ #Assert must_respond_with :redirect must_redirect_to tasks_path - end end @@ -117,13 +114,34 @@ # Note: If there was a way to fail to save the changes to a task, that would be a great # thing to test. it "can update an existing task" do - skip + # Your code here + task = Task.create!(name: "new task", description: "making a new one") + task_data = { + task: { + name: "not new", + }, + } + #Act + patch task_path(task), params: task_data + #Assert + must_respond_with :redirect + must_redirect_to task_path(task) + + task.reload + expect(task.name).must_equal(task_data[:task][:name]) end it "will redirect to the root page if given an invalid id" do - skip + # Your code here + #Arrange + task_id = 55 + #Act + patch task_path(task_id) + #Assert + must_respond_with :redirect + must_redirect_to tasks_path end end @@ -131,16 +149,15 @@ describe "destroy" do # Your tests go here it "can destroy a model" do - #Arrange - task = Task.new name: "read", description: "Read one book per week" - task.create! - expect { - delete task_path(task.id) - }.must_change 'Task.count', -1 - read =Task.find_by( description: "Read one book per week") - expect(read).must_be_nil - must_respond_with :redirect - must_redirect_to tasks_path + #Arrange + task = Task.create!(name: "read", description: "Read one book per week") + expect { + delete task_path(task.id) + }.must_change "Task.count", -1 + read = Task.find_by(description: "Read one book per week") + expect(read).must_be_nil + must_respond_with :redirect + must_redirect_to tasks_path end end @@ -148,5 +165,4 @@ describe "toggle_complete" do # Your tests go here end - end From bce03be548921b14aa0906323e953703ff12993f Mon Sep 17 00:00:00 2001 From: Bitaman Date: Sat, 13 Apr 2019 06:51:50 -0700 Subject: [PATCH 13/16] updated the controller with strong params --- app/controllers/tasks_controller.rb | 18 ++- app/views/tasks/index.html.erb | 2 +- config/routes.rb | 1 + log/development.log | 204 ++++++++++++++++++++++++++++ 4 files changed, 222 insertions(+), 3 deletions(-) diff --git a/app/controllers/tasks_controller.rb b/app/controllers/tasks_controller.rb index ec7fbb53c..e6ad88580 100644 --- a/app/controllers/tasks_controller.rb +++ b/app/controllers/tasks_controller.rb @@ -18,7 +18,7 @@ def show end def new - @task = Task.new + @task = Task.new(task_params) end def create @@ -62,6 +62,20 @@ def destroy redirect_to tasks_path end - def toggle_complete + # def complete + # @task = Task.find_by(id: params[:id]) + # unless @task + # redirect_to tasks_path + # return + # end + # @task.completed = !@task.completed + # @task.save + # redirect_to root_path + # end + + private + + def task_params + return params.require(:task).permit(:name, :description, :completion_date) end end diff --git a/app/views/tasks/index.html.erb b/app/views/tasks/index.html.erb index 2f79da460..d443218b2 100644 --- a/app/views/tasks/index.html.erb +++ b/app/views/tasks/index.html.erb @@ -10,7 +10,7 @@ <%= link_to task.name, task_path(task) %> : <%= task.description %> , <%= task.completion_date%> <%= link_to "Edit", edit_task_path(task.id) %> <%= link_to "Delete", task_path(task.id), method: :delete, data: {confirm: "are you sure you want to delete this task?"} %> - + <%= link_to "Mark complete", tasks_path, class: 'button' %>
    • <% end %>
    \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index 756aa3675..fa3f2ca5f 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -2,4 +2,5 @@ # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html root "tasks#index" resources :tasks + post "/tasks", to: "tasks#complete" end diff --git a/log/development.log b/log/development.log index 787d839fb..d3161019a 100644 --- a/log/development.log +++ b/log/development.log @@ -2230,3 +2230,207 @@ Processing by TasksController#index as HTML Completed 200 OK in 28ms (Views: 26.1ms | ActiveRecord: 0.5ms) +Started GET "/tasks" for ::1 at 2019-04-12 15:34:04 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (0.9ms) +Completed 500 Internal Server Error in 7ms (ActiveRecord: 0.0ms) + + + +SyntaxError - syntax error, unexpected tIDENTIFIER, expecting ')' +...( link_to "" tas... +... ^~~~~~ +/Users/bitaamani/Documents/homework/projects/ruby-projects/TaskList/app/views/tasks/index.html.erb:13: syntax error, unexpected tIDENTIFIER, expecting ')' +...rk complete" task_path(task.id) );@output_buffer.sa... +... ^~~~~~~~~: + app/views/tasks/index.html.erb:13:in `' + +Started POST "/__better_errors/5a000a1412158a91/variables" for ::1 at 2019-04-12 15:34:05 -0700 + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" LIMIT $1 [["LIMIT", 11]] + ↳ /Users/bitaamani/.rvm/gems/ruby-2.6.0/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:98 +Started GET "/tasks" for ::1 at 2019-04-12 15:36:47 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" LIMIT $1 [["LIMIT", 11]] + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/did_you_mean-1.3.0/lib/did_you_mean/core_ext/name_error.rb:8 + CACHE Task Load (0.0ms) SELECT "tasks".* FROM "tasks" LIMIT $1 [["LIMIT", 11]] + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/did_you_mean-1.3.0/lib/did_you_mean/core_ext/name_error.rb:8 + CACHE Task Load (0.0ms) SELECT "tasks".* FROM "tasks" LIMIT $1 [["LIMIT", 11]] + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/did_you_mean-1.3.0/lib/did_you_mean/core_ext/name_error.rb:8 + CACHE Task Load (0.0ms) SELECT "tasks".* FROM "tasks" LIMIT $1 [["LIMIT", 11]] + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/did_you_mean-1.3.0/lib/did_you_mean/core_ext/name_error.rb:8 + CACHE Task Load (0.0ms) SELECT "tasks".* FROM "tasks" LIMIT $1 [["LIMIT", 11]] + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/did_you_mean-1.3.0/lib/did_you_mean/core_ext/name_error.rb:8 + CACHE Task Load (0.0ms) SELECT "tasks".* FROM "tasks" LIMIT $1 [["LIMIT", 11]] + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/did_you_mean-1.3.0/lib/did_you_mean/core_ext/name_error.rb:8 + CACHE Task Load (0.0ms) SELECT "tasks".* FROM "tasks" LIMIT $1 [["LIMIT", 11]] + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/did_you_mean-1.3.0/lib/did_you_mean/core_ext/name_error.rb:4 + CACHE Task Load (0.0ms) SELECT "tasks".* FROM "tasks" LIMIT $1 [["LIMIT", 11]] + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/did_you_mean-1.3.0/lib/did_you_mean/core_ext/name_error.rb:4 + CACHE Task Load (0.0ms) SELECT "tasks".* FROM "tasks" LIMIT $1 [["LIMIT", 11]] + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/did_you_mean-1.3.0/lib/did_you_mean/core_ext/name_error.rb:4 + CACHE Task Load (0.0ms) SELECT "tasks".* FROM "tasks" LIMIT $1 [["LIMIT", 11]] + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/did_you_mean-1.3.0/lib/did_you_mean/core_ext/name_error.rb:4 + CACHE Task Load (0.0ms) SELECT "tasks".* FROM "tasks" LIMIT $1 [["LIMIT", 11]] + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/did_you_mean-1.3.0/lib/did_you_mean/core_ext/name_error.rb:4 + CACHE Task Load (0.0ms) SELECT "tasks".* FROM "tasks" LIMIT $1 [["LIMIT", 11]] + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/did_you_mean-1.3.0/lib/did_you_mean/core_ext/name_error.rb:4 + Rendered tasks/index.html.erb within layouts/application (429.1ms) +Completed 500 Internal Server Error in 434ms (ActiveRecord: 1.0ms) + + + CACHE Task Load (0.0ms) SELECT "tasks".* FROM "tasks" LIMIT $1 [["LIMIT", 11]] + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/did_you_mean-1.3.0/lib/did_you_mean/core_ext/name_error.rb:8 + CACHE Task Load (0.0ms) SELECT "tasks".* FROM "tasks" LIMIT $1 [["LIMIT", 11]] + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/did_you_mean-1.3.0/lib/did_you_mean/core_ext/name_error.rb:8 + CACHE Task Load (0.0ms) SELECT "tasks".* FROM "tasks" LIMIT $1 [["LIMIT", 11]] + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/did_you_mean-1.3.0/lib/did_you_mean/core_ext/name_error.rb:8 + CACHE Task Load (0.0ms) SELECT "tasks".* FROM "tasks" LIMIT $1 [["LIMIT", 11]] + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/did_you_mean-1.3.0/lib/did_you_mean/core_ext/name_error.rb:8 + CACHE Task Load (0.0ms) SELECT "tasks".* FROM "tasks" LIMIT $1 [["LIMIT", 11]] + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/did_you_mean-1.3.0/lib/did_you_mean/core_ext/name_error.rb:8 + CACHE Task Load (0.0ms) SELECT "tasks".* FROM "tasks" LIMIT $1 [["LIMIT", 11]] + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/did_you_mean-1.3.0/lib/did_you_mean/core_ext/name_error.rb:8 + +NameError - undefined local variable or method `new_post_path' for #<#:0x00007f8984bc61e0> +Did you mean? new_task_path: + app/views/tasks/index.html.erb:13:in `block in _app_views_tasks_index_html_erb__284753556052239055_70114307093920' + app/views/tasks/index.html.erb:8:in `_app_views_tasks_index_html_erb__284753556052239055_70114307093920' + +Started POST "/__better_errors/e694c3f58eeaedf9/variables" for ::1 at 2019-04-12 15:36:48 -0700 +Started GET "/tasks" for ::1 at 2019-04-12 15:37:20 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (3.9ms) +Completed 200 OK in 28ms (Views: 25.5ms | ActiveRecord: 0.4ms) + + +Started GET "/tasks/6" for ::1 at 2019-04-12 15:37:28 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"6"} + Task Load (0.6ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 6], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:12 + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.8ms) +Completed 200 OK in 25ms (Views: 19.5ms | ActiveRecord: 0.6ms) + + +Started GET "/tasks" for ::1 at 2019-04-12 15:40:13 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (6.2ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (12.6ms) +Completed 200 OK in 39ms (Views: 30.8ms | ActiveRecord: 6.2ms) + + +Started GET "/tasks" for ::1 at 2019-04-12 15:40:15 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (6.8ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (12.1ms) +Completed 200 OK in 32ms (Views: 24.0ms | ActiveRecord: 6.8ms) + + +Started GET "/tasks" for ::1 at 2019-04-12 15:40:17 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (3.8ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (8.4ms) +Completed 200 OK in 31ms (Views: 25.6ms | ActiveRecord: 3.8ms) + + +Started GET "/tasks" for ::1 at 2019-04-12 15:40:18 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (3.2ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (8.1ms) +Completed 200 OK in 33ms (Views: 27.7ms | ActiveRecord: 3.2ms) + + +Started GET "/tasks" for ::1 at 2019-04-13 06:47:00 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (2.6ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (37.0ms) +Completed 200 OK in 99ms (Views: 77.1ms | ActiveRecord: 11.1ms) + + +Started GET "/tasks" for ::1 at 2019-04-13 06:47:02 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.7ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (10.3ms) +Completed 200 OK in 79ms (Views: 75.5ms | ActiveRecord: 0.7ms) + + +Started GET "/tasks" for ::1 at 2019-04-13 06:47:04 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (4.0ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (9.8ms) +Completed 200 OK in 34ms (Views: 28.4ms | ActiveRecord: 4.0ms) + + +Started GET "/tasks" for ::1 at 2019-04-13 06:47:06 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (6.1ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (10.5ms) +Completed 200 OK in 36ms (Views: 28.7ms | ActiveRecord: 6.1ms) + + +Started GET "/tasks" for ::1 at 2019-04-13 06:47:07 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.6ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (5.9ms) +Completed 200 OK in 31ms (Views: 28.4ms | ActiveRecord: 0.6ms) + + +Started GET "/tasks" for ::1 at 2019-04-13 06:47:09 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (3.4ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (9.7ms) +Completed 200 OK in 35ms (Views: 29.6ms | ActiveRecord: 3.4ms) + + +Started DELETE "/tasks/4" for ::1 at 2019-04-13 06:47:37 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"authenticity_token"=>"HuGxJF4Znteuor/gYdNqFn+dVDZUM/VnouDSiQnoSttjR5ByQ/x+fSVZ/DIyHtG2I2U0kOW2dxG7n9rUVuWw2w==", "id"=>"4"} + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 4], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:56 +  (1.1ms) BEGIN + ↳ app/controllers/tasks_controller.rb:61 + Task Destroy (3.1ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 4]] + ↳ app/controllers/tasks_controller.rb:61 +  (1.5ms) COMMIT + ↳ app/controllers/tasks_controller.rb:61 +Redirected to http://localhost:3000/tasks +Completed 302 Found in 15ms (ActiveRecord: 6.9ms) + + +Started GET "/tasks" for ::1 at 2019-04-13 06:47:37 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (4.1ms) +Completed 200 OK in 23ms (Views: 20.7ms | ActiveRecord: 0.5ms) + + From 65b75414dccd7b16f150b1e8dd914707f5869a20 Mon Sep 17 00:00:00 2001 From: Bitaman Date: Sat, 13 Apr 2019 07:29:11 -0700 Subject: [PATCH 14/16] fixed some issues with strong params --- app/controllers/tasks_controller.rb | 15 +- log/development.log | 352 +++++ log/test.log | 1582 +++++++++++++++++++++ test/controllers/tasks_controller_test.rb | 15 + 4 files changed, 1955 insertions(+), 9 deletions(-) diff --git a/app/controllers/tasks_controller.rb b/app/controllers/tasks_controller.rb index e6ad88580..04a3d9478 100644 --- a/app/controllers/tasks_controller.rb +++ b/app/controllers/tasks_controller.rb @@ -18,18 +18,15 @@ def show end def new - @task = Task.new(task_params) + @task = Task.new end def create - @task = Task.new + @task = Task.new(task_params) unless params["task"] render :new, status: :bad_request return end - - @task.name = params["task"]["name"] - @task.description = params["task"]["description"] @task.save redirect_to tasks_path end @@ -42,14 +39,14 @@ def edit end def update - @task = Task.find_by(id: params[:id]) - unless @task + task = Task.find_by(id: params[:id]) + unless task redirect_to tasks_path return end - @task.update(name: params["task"]["name"], description: params["task"]["description"], completion_date: params["task"]["completion_date"]) - redirect_to task_path + task.update!(task_params) + redirect_to task_path(task) end def destroy diff --git a/log/development.log b/log/development.log index d3161019a..a144c8552 100644 --- a/log/development.log +++ b/log/development.log @@ -2434,3 +2434,355 @@ Processing by TasksController#index as HTML Completed 200 OK in 23ms (Views: 20.7ms | ActiveRecord: 0.5ms) +Started GET "/tasks" for ::1 at 2019-04-13 06:56:34 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.8ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (15.0ms) +Completed 200 OK in 31ms (Views: 20.3ms | ActiveRecord: 7.9ms) + + +Started GET "/tasks/new" for ::1 at 2019-04-13 06:56:39 -0700 +Processing by TasksController#new as HTML +Completed 400 Bad Request in 3ms (ActiveRecord: 0.0ms) + + + +ActionController::ParameterMissing - param is missing or the value is empty: task: + app/controllers/tasks_controller.rb:79:in `task_params' + app/controllers/tasks_controller.rb:21:in `new' + +Started POST "/__better_errors/d4961fb7e5893e8f/variables" for ::1 at 2019-04-13 06:56:39 -0700 +Started GET "/tasks/new" for ::1 at 2019-04-13 07:01:22 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (4.1ms) + Rendered tasks/new.html.erb within layouts/application (5.5ms) +Completed 200 OK in 41ms (Views: 21.7ms | ActiveRecord: 4.5ms) + + +Started GET "/tasks" for ::1 at 2019-04-13 07:01:28 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (6.5ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (11.0ms) +Completed 200 OK in 40ms (Views: 31.1ms | ActiveRecord: 6.5ms) + + +Started GET "/tasks/6/edit" for ::1 at 2019-04-13 07:13:34 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"6"} + Task Load (0.6ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 6], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:35 + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (2.4ms) + Rendered tasks/edit.html.erb within layouts/application (4.6ms) +Completed 200 OK in 25ms (Views: 20.5ms | ActiveRecord: 1.2ms) + + +Started PATCH "/tasks/6" for ::1 at 2019-04-13 07:13:38 -0700 +Processing by TasksController#update as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"9jvfBev3tjypA6DnLgTcZc19fXvT9H67ErDgTKAVbrbtWyerIBA08q5jYAgQdgU8zhRZ7KOPqhcWCXWBZzgLzQ==", "task"=>{"name"=>"play", "description"=>"play some bord game", "completion_date"=>"2018-02-03"}, "commit"=>"Edit", "id"=>"6"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 6], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:42 +  (3.3ms) BEGIN + ↳ app/controllers/tasks_controller.rb:48 + Task Update (2.6ms) UPDATE "tasks" SET "completion_date" = $1, "updated_at" = $2 WHERE "tasks"."id" = $3 [["completion_date", "2018-02-03 00:00:00"], ["updated_at", "2019-04-13 14:13:38.755107"], ["id", 6]] + ↳ app/controllers/tasks_controller.rb:48 +  (2.9ms) COMMIT + ↳ app/controllers/tasks_controller.rb:48 +Redirected to http://localhost:3000/tasks/6 +Completed 302 Found in 17ms (ActiveRecord: 9.1ms) + + +Started GET "/tasks/6" for ::1 at 2019-04-13 07:13:38 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"6"} + Task Load (0.9ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 6], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:12 + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.7ms) +Completed 200 OK in 20ms (Views: 17.4ms | ActiveRecord: 0.9ms) + + +Started GET "/tasks" for ::1 at 2019-04-13 07:13:41 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (4.4ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (10.0ms) +Completed 200 OK in 37ms (Views: 30.7ms | ActiveRecord: 4.4ms) + + +Started GET "/tasks/3/edit" for ::1 at 2019-04-13 07:13:46 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"3"} + Task Load (2.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 3], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:35 + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (3.3ms) + Rendered tasks/edit.html.erb within layouts/application (5.0ms) +Completed 200 OK in 35ms (Views: 29.8ms | ActiveRecord: 2.2ms) + + +Started PATCH "/tasks/3" for ::1 at 2019-04-13 07:13:49 -0700 +Processing by TasksController#update as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"8IuWPv51MN/KuY3bRpM55zvvcbQWmR1EpfO9xOvGc2mkyTOg8zr0PQtCuE0Nxcl+JVJ6nNjWHq3wMu2HxlbAsg==", "task"=>{"name"=>"clay", "description"=>"google how to do this", "completion_date"=>"2018-02-05"}, "commit"=>"Edit", "id"=>"3"} + Task Load (2.6ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 3], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:42 +  (0.3ms) BEGIN + ↳ app/controllers/tasks_controller.rb:48 + Task Update (0.4ms) UPDATE "tasks" SET "completion_date" = $1, "updated_at" = $2 WHERE "tasks"."id" = $3 [["completion_date", "2018-02-05 00:00:00"], ["updated_at", "2019-04-13 14:13:49.944326"], ["id", 3]] + ↳ app/controllers/tasks_controller.rb:48 +  (0.5ms) COMMIT + ↳ app/controllers/tasks_controller.rb:48 +Redirected to http://localhost:3000/tasks/3 +Completed 302 Found in 9ms (ActiveRecord: 3.9ms) + + +Started GET "/tasks/3" for ::1 at 2019-04-13 07:13:49 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"3"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 3], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:12 + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.7ms) +Completed 200 OK in 20ms (Views: 17.4ms | ActiveRecord: 0.4ms) + + +Started GET "/tasks" for ::1 at 2019-04-13 07:13:52 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (3.3ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (8.1ms) +Completed 200 OK in 52ms (Views: 46.0ms | ActiveRecord: 3.3ms) + + +Started GET "/tasks/10/edit" for ::1 at 2019-04-13 07:13:54 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"10"} + Task Load (4.0ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 10], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:35 + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (4.6ms) + Rendered tasks/edit.html.erb within layouts/application (6.3ms) +Completed 200 OK in 33ms (Views: 26.6ms | ActiveRecord: 4.0ms) + + +Started PATCH "/tasks/10" for ::1 at 2019-04-13 07:13:58 -0700 +Processing by TasksController#update as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"735szndZIqMy5deL4LlkeYEAsTeZ+JbnU6uR+cAwc971mO/Kr1VxuDzLDJTez9mWaYFkNq9WDK4OJy+fP7ghlw==", "task"=>{"name"=>"Drink", "description"=>"8 glasses of water per day", "completion_date"=>"2018-02-03"}, "commit"=>"Edit", "id"=>"10"} + Task Load (4.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 10], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:42 +  (0.2ms) BEGIN + ↳ app/controllers/tasks_controller.rb:48 + Task Update (0.4ms) UPDATE "tasks" SET "completion_date" = $1, "updated_at" = $2 WHERE "tasks"."id" = $3 [["completion_date", "2018-02-03 00:00:00"], ["updated_at", "2019-04-13 14:13:58.186582"], ["id", 10]] + ↳ app/controllers/tasks_controller.rb:48 +  (0.7ms) COMMIT + ↳ app/controllers/tasks_controller.rb:48 +Redirected to http://localhost:3000/tasks/10 +Completed 302 Found in 11ms (ActiveRecord: 5.6ms) + + +Started GET "/tasks/10" for ::1 at 2019-04-13 07:13:58 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"10"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 10], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:12 + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.6ms) +Completed 200 OK in 19ms (Views: 16.3ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks" for ::1 at 2019-04-13 07:14:03 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (2.5ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (6.4ms) +Completed 200 OK in 29ms (Views: 23.8ms | ActiveRecord: 2.5ms) + + +Started GET "/tasks/9/edit" for ::1 at 2019-04-13 07:14:05 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"9"} + Task Load (3.6ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 9], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:35 + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (3.3ms) + Rendered tasks/edit.html.erb within layouts/application (5.1ms) +Completed 200 OK in 33ms (Views: 26.3ms | ActiveRecord: 3.6ms) + + +Started PATCH "/tasks/9" for ::1 at 2019-04-13 07:14:08 -0700 +Processing by TasksController#update as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"cRaHQO+3N2FWBM5sjf/zrfMFL9VCR42Ijt3mDOSoRD/nuoBOE/FFdJWcrKueiXZdGVcktskdNs70CmogYrJcrg==", "task"=>{"name"=>"Art", "description"=>"pain a picture", "completion_date"=>"2018-02-05"}, "commit"=>"Edit", "id"=>"9"} + Task Load (0.9ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 9], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:42 +  (0.2ms) BEGIN + ↳ app/controllers/tasks_controller.rb:48 + Task Update (0.6ms) UPDATE "tasks" SET "completion_date" = $1, "updated_at" = $2 WHERE "tasks"."id" = $3 [["completion_date", "2018-02-05 00:00:00"], ["updated_at", "2019-04-13 14:14:08.728517"], ["id", 9]] + ↳ app/controllers/tasks_controller.rb:48 +  (0.5ms) COMMIT + ↳ app/controllers/tasks_controller.rb:48 +Redirected to http://localhost:3000/tasks/9 +Completed 302 Found in 7ms (ActiveRecord: 2.2ms) + + +Started GET "/tasks/9" for ::1 at 2019-04-13 07:14:08 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"9"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 9], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:12 + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.6ms) +Completed 200 OK in 20ms (Views: 17.6ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks" for ::1 at 2019-04-13 07:14:11 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (2.9ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (7.6ms) +Completed 200 OK in 29ms (Views: 24.8ms | ActiveRecord: 2.9ms) + + +Started GET "/tasks/7/edit" for ::1 at 2019-04-13 07:14:13 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"7"} + Task Load (0.7ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 7], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:35 + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (3.2ms) + Rendered tasks/edit.html.erb within layouts/application (5.0ms) +Completed 200 OK in 32ms (Views: 28.0ms | ActiveRecord: 0.7ms) + + +Started PATCH "/tasks/7" for ::1 at 2019-04-13 07:14:17 -0700 +Processing by TasksController#update as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"sTjSNQrLZGB3v8tCvtwtXjC77pPKGWu8SVU1BwYXxNIJxCTlyxHAk5PdSSbcXy3b68VwIkHPkwt1L89xV86VQA==", "task"=>{"name"=>"Exercise", "description"=>"20 minutes in the morning", "completion_date"=>"2018-02-03"}, "commit"=>"Edit", "id"=>"7"} + Task Load (2.9ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 7], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:42 +  (0.2ms) BEGIN + ↳ app/controllers/tasks_controller.rb:48 + Task Update (0.4ms) UPDATE "tasks" SET "completion_date" = $1, "updated_at" = $2 WHERE "tasks"."id" = $3 [["completion_date", "2018-02-03 00:00:00"], ["updated_at", "2019-04-13 14:14:17.127402"], ["id", 7]] + ↳ app/controllers/tasks_controller.rb:48 +  (0.6ms) COMMIT + ↳ app/controllers/tasks_controller.rb:48 +Redirected to http://localhost:3000/tasks/7 +Completed 302 Found in 12ms (ActiveRecord: 4.2ms) + + +Started GET "/tasks/7" for ::1 at 2019-04-13 07:14:17 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"7"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 7], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:12 + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.5ms) +Completed 200 OK in 35ms (Views: 17.5ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for ::1 at 2019-04-13 07:14:19 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (3.7ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (8.9ms) +Completed 200 OK in 31ms (Views: 25.0ms | ActiveRecord: 3.7ms) + + +Started GET "/tasks/2/edit" for ::1 at 2019-04-13 07:14:21 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"2"} + Task Load (1.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 2], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:35 + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (4.1ms) + Rendered tasks/edit.html.erb within layouts/application (6.7ms) +Completed 200 OK in 37ms (Views: 30.8ms | ActiveRecord: 1.1ms) + + +Started PATCH "/tasks/2" for ::1 at 2019-04-13 07:14:25 -0700 +Processing by TasksController#update as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"ge4Gdn3dP26lyh9jfPHlx4AOe8ky/yjK3DXUsGM7kdzQmmE0dngwVkTPYDF/bGItIkFwehWZVizzxct4dkRPtw==", "task"=>{"name"=>"read77", "description"=>"read a book", "completion_date"=>"2018-02-05"}, "commit"=>"Edit", "id"=>"2"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 2], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:42 +  (1.8ms) BEGIN + ↳ app/controllers/tasks_controller.rb:48 + Task Update (0.8ms) UPDATE "tasks" SET "completion_date" = $1, "updated_at" = $2 WHERE "tasks"."id" = $3 [["completion_date", "2018-02-05 00:00:00"], ["updated_at", "2019-04-13 14:14:25.311120"], ["id", 2]] + ↳ app/controllers/tasks_controller.rb:48 +  (0.5ms) COMMIT + ↳ app/controllers/tasks_controller.rb:48 +Redirected to http://localhost:3000/tasks/2 +Completed 302 Found in 10ms (ActiveRecord: 3.5ms) + + +Started GET "/tasks/2" for ::1 at 2019-04-13 07:14:25 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"2"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 2], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:12 + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.8ms) +Completed 200 OK in 20ms (Views: 17.7ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for ::1 at 2019-04-13 07:14:27 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (3.2ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (8.8ms) +Completed 200 OK in 30ms (Views: 24.7ms | ActiveRecord: 3.2ms) + + +Started GET "/tasks/5/edit" for ::1 at 2019-04-13 07:14:29 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"5"} + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 5], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:35 + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (3.5ms) + Rendered tasks/edit.html.erb within layouts/application (5.1ms) +Completed 200 OK in 30ms (Views: 26.6ms | ActiveRecord: 0.5ms) + + +Started PATCH "/tasks/5" for ::1 at 2019-04-13 07:14:33 -0700 +Processing by TasksController#update as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"MA8s8bwcDN0M3VuL/0q3zYU85hfNtQ9nMYgoPAr9mNMBDG1zl/AYEiJQVqx4X+ZjoljwdcfskLzrETYggejuTw==", "task"=>{"name"=>"Cooking", "description"=>"cook me a dinner", "completion_date"=>"2018-02-03"}, "commit"=>"Edit", "id"=>"5"} + Task Load (1.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 5], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:42 +  (0.9ms) BEGIN + ↳ app/controllers/tasks_controller.rb:48 + Task Update (0.5ms) UPDATE "tasks" SET "completion_date" = $1, "updated_at" = $2 WHERE "tasks"."id" = $3 [["completion_date", "2018-02-03 00:00:00"], ["updated_at", "2019-04-13 14:14:33.313218"], ["id", 5]] + ↳ app/controllers/tasks_controller.rb:48 +  (0.5ms) COMMIT + ↳ app/controllers/tasks_controller.rb:48 +Redirected to http://localhost:3000/tasks/5 +Completed 302 Found in 9ms (ActiveRecord: 3.2ms) + + +Started GET "/tasks/5" for ::1 at 2019-04-13 07:14:33 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"5"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 5], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:12 + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.8ms) +Completed 200 OK in 20ms (Views: 17.5ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks" for ::1 at 2019-04-13 07:14:35 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (2.8ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (7.3ms) +Completed 200 OK in 30ms (Views: 24.5ms | ActiveRecord: 2.8ms) + + diff --git a/log/test.log b/log/test.log index 696f258aa..3267e6d1e 100644 --- a/log/test.log +++ b/log/test.log @@ -9347,3 +9347,1585 @@ Redirected to http://www.example.com/tasks/980190967 Completed 302 Found in 5ms (ActiveRecord: 1.4ms) Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]]  (0.2ms) ROLLBACK +  (0.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.1ms) BEGIN +  (2.7ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.2ms) COMMIT +  (0.2ms) BEGIN + Fixtures Load (2.2ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-13 13:53:46.560693', '2019-04-13 13:53:46.560693'), (298486374, 'MyString', 'MyString', NULL, '2019-04-13 13:53:46.560693', '2019-04-13 13:53:46.560693') +  (0.7ms) COMMIT +  (0.2ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-13 13:53:46.593561"], ["updated_at", "2019-04-13 13:53:46.593561"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190963" for 127.0.0.1 at 2019-04-13 06:53:46 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190963"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (1.7ms) +Completed 200 OK in 177ms (Views: 163.9ms | ActiveRecord: 0.4ms) +  (0.5ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-13 06:53:46 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.3ms) +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.5ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-13 06:53:46 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-13 13:53:46.799148"], ["updated_at", "2019-04-13 13:53:46.799148"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.6ms) +  (0.6ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.4ms) ROLLBACK +  (0.2ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-13 06:53:46 -0700 +Processing by TasksController#new as HTML +Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-13 13:53:46.813629"], ["updated_at", "2019-04-13 13:53:46.813629"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190965/edit" for 127.0.0.1 at 2019-04-13 06:53:46 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190965"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (14.7ms) + Rendered tasks/edit.html.erb within layouts/application (16.9ms) +Completed 200 OK in 22ms (Views: 18.6ms | ActiveRecord: 0.4ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-13 06:53:46 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.3ms) +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-13 06:53:46 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (3.1ms) +Completed 200 OK in 7ms (Views: 5.3ms | ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-13 06:53:46 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.2ms) +Completed 200 OK in 3ms (Views: 1.9ms | ActiveRecord: 0.3ms) +  (0.1ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "making a new one"], ["created_at", "2019-04-13 13:53:46.863836"], ["updated_at", "2019-04-13 13:53:46.863836"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started PATCH "/tasks/980190966" for 127.0.0.1 at 2019-04-13 06:53:46 -0700 +Processing by TasksController#update as HTML + Parameters: {"task"=>{"name"=>"not new"}, "id"=>"980190966"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190966], ["LIMIT", 1]] +  (0.3ms) SAVEPOINT active_record_1 + Task Update (4.5ms) UPDATE "tasks" SET "name" = $1, "description" = $2, "updated_at" = $3 WHERE "tasks"."id" = $4 [["name", "not new"], ["description", nil], ["updated_at", "2019-04-13 13:53:46.869693"], ["id", 980190966]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks/980190966 +Completed 302 Found in 9ms (ActiveRecord: 5.3ms) + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190966], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +Started PATCH "/tasks/55" for 127.0.0.1 at 2019-04-13 06:53:46 -0700 +Processing by TasksController#update as HTML + Parameters: {"id"=>"55"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 55], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.2ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-13 13:53:46.885809"], ["updated_at", "2019-04-13 13:53:46.885809"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190967" for 127.0.0.1 at 2019-04-13 06:53:46 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190967"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Task Destroy (0.3ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190967]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 1.0ms) +  (0.2ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."description" = $1 LIMIT $2 [["description", "Read one book per week"], ["LIMIT", 1]] +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.2ms) ROLLBACK +  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) BEGIN +  (0.6ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.5ms) COMMIT +  (0.2ms) BEGIN + Fixtures Load (0.8ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-13 13:54:17.121034', '2019-04-13 13:54:17.121034'), (298486374, 'MyString', 'MyString', NULL, '2019-04-13 13:54:17.121034', '2019-04-13 13:54:17.121034') +  (0.9ms) COMMIT +  (0.1ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-13 06:54:17 -0700 +Processing by TasksController#new as HTML +Completed 400 Bad Request in 5ms (ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-13 13:54:17.185803"], ["updated_at", "2019-04-13 13:54:17.185803"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190963" for 127.0.0.1 at 2019-04-13 06:54:17 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190963"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.9ms) +Completed 200 OK in 131ms (Views: 125.6ms | ActiveRecord: 0.5ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-13 06:54:17 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.3ms) +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-13 06:54:17 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.3ms) +Completed 200 OK in 5ms (Views: 3.5ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-13 06:54:17 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.1ms) +Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.3ms) +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.4ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-13 06:54:17 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-13 13:54:17.347003"], ["updated_at", "2019-04-13 13:54:17.347003"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 0.8ms) +  (0.7ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "making a new one"], ["created_at", "2019-04-13 13:54:17.356666"], ["updated_at", "2019-04-13 13:54:17.356666"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started PATCH "/tasks/980190965" for 127.0.0.1 at 2019-04-13 06:54:17 -0700 +Processing by TasksController#update as HTML + Parameters: {"task"=>{"name"=>"not new"}, "id"=>"980190965"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] +  (0.3ms) SAVEPOINT active_record_1 + Task Update (0.5ms) UPDATE "tasks" SET "name" = $1, "updated_at" = $2 WHERE "tasks"."id" = $3 [["name", "not new"], ["updated_at", "2019-04-13 13:54:17.362820"], ["id", 980190965]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks/980190965 +Completed 302 Found in 6ms (ActiveRecord: 1.4ms) + Task Load (1.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +Started PATCH "/tasks/55" for 127.0.0.1 at 2019-04-13 06:54:17 -0700 +Processing by TasksController#update as HTML + Parameters: {"id"=>"55"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 55], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.3ms) +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-13 13:54:17.377717"], ["updated_at", "2019-04-13 13:54:17.377717"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190966/edit" for 127.0.0.1 at 2019-04-13 06:54:17 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190966"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190966], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (6.1ms) + Rendered tasks/edit.html.erb within layouts/application (8.0ms) +Completed 200 OK in 12ms (Views: 9.8ms | ActiveRecord: 0.3ms) +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-13 06:54:17 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.2ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.3ms) SAVEPOINT active_record_1 + Task Create (0.5ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-13 13:54:17.401512"], ["updated_at", "2019-04-13 13:54:17.401512"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190967" for 127.0.0.1 at 2019-04-13 06:54:17 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190967"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Task Destroy (0.3ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190967]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.8ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."description" = $1 LIMIT $2 [["description", "Read one book per week"], ["LIMIT", 1]] +  (0.4ms) ROLLBACK +  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) BEGIN +  (0.6ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.2ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (1.1ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-13 14:01:40.783412', '2019-04-13 14:01:40.783412'), (298486374, 'MyString', 'MyString', NULL, '2019-04-13 14:01:40.783412', '2019-04-13 14:01:40.783412') +  (1.0ms) COMMIT +  (0.2ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-13 07:01:40 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (5.4ms) + Rendered tasks/new.html.erb within layouts/application (7.0ms) +Completed 200 OK in 160ms (Views: 150.2ms | ActiveRecord: 0.0ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.4ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-13 07:01:40 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +Unpermitted parameter: :completed +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.8ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-13 14:01:40.979040"], ["updated_at", "2019-04-13 14:01:40.979040"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 5ms (ActiveRecord: 1.2ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-13 14:01:40.990005"], ["updated_at", "2019-04-13 14:01:40.990005"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190964/edit" for 127.0.0.1 at 2019-04-13 07:01:40 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190964"} + Task Load (0.7ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190964], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (1.5ms) + Rendered tasks/edit.html.erb within layouts/application (2.3ms) +Completed 200 OK in 7ms (Views: 3.5ms | ActiveRecord: 0.7ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-13 07:01:41 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.4ms) +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.1ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-13 07:01:41 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.0ms) +Completed 200 OK in 5ms (Views: 3.1ms | ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-13 07:01:41 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.3ms) +Completed 200 OK in 3ms (Views: 2.4ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.3ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "making a new one"], ["created_at", "2019-04-13 14:01:41.029447"], ["updated_at", "2019-04-13 14:01:41.029447"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started PATCH "/tasks/980190965" for 127.0.0.1 at 2019-04-13 07:01:41 -0700 +Processing by TasksController#update as HTML + Parameters: {"task"=>{"name"=>"not new"}, "id"=>"980190965"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Task Update (0.3ms) UPDATE "tasks" SET "name" = $1, "updated_at" = $2 WHERE "tasks"."id" = $3 [["name", "not new"], ["updated_at", "2019-04-13 14:01:41.034326"], ["id", 980190965]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks/980190965 +Completed 302 Found in 3ms (ActiveRecord: 0.9ms) + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +Started PATCH "/tasks/55" for 127.0.0.1 at 2019-04-13 07:01:41 -0700 +Processing by TasksController#update as HTML + Parameters: {"id"=>"55"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 55], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.5ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-13 14:01:41.046439"], ["updated_at", "2019-04-13 14:01:41.046439"]] +  (0.4ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190966" for 127.0.0.1 at 2019-04-13 07:01:41 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190966"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190966], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Task Destroy (0.3ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190966]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 0.9ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."description" = $1 LIMIT $2 [["description", "Read one book per week"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-13 07:01:41 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.3ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-13 14:01:41.065821"], ["updated_at", "2019-04-13 14:01:41.065821"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190967" for 127.0.0.1 at 2019-04-13 07:01:41 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190967"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.6ms) +Completed 200 OK in 4ms (Views: 2.3ms | ActiveRecord: 0.2ms) +  (0.2ms) ROLLBACK +  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) BEGIN +  (0.4ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.2ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.8ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-13 14:11:33.904205', '2019-04-13 14:11:33.904205'), (298486374, 'MyString', 'MyString', NULL, '2019-04-13 14:11:33.904205', '2019-04-13 14:11:33.904205') +  (0.9ms) COMMIT +  (0.3ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +Started PATCH "/tasks/55" for 127.0.0.1 at 2019-04-13 07:11:33 -0700 +Processing by TasksController#update as HTML + Parameters: {"id"=>"55"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 55], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 7ms (ActiveRecord: 0.5ms) +  (0.1ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "making a new one"], ["created_at", "2019-04-13 14:11:33.949982"], ["updated_at", "2019-04-13 14:11:33.949982"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started PATCH "/tasks/980190963" for 127.0.0.1 at 2019-04-13 07:11:33 -0700 +Processing by TasksController#update as HTML + Parameters: {"task"=>{"name"=>"not new"}, "id"=>"980190963"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] +  (0.2ms) SAVEPOINT active_record_1 + Task Update (0.3ms) UPDATE "tasks" SET "name" = $1, "updated_at" = $2 WHERE "tasks"."id" = $3 [["name", "not new"], ["updated_at", "2019-04-13 14:11:33.955364"], ["id", 980190963]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks/980190963 +Completed 302 Found in 4ms (ActiveRecord: 0.8ms) + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------- +TasksController::update: test_0003_will not update if the params are invelid +---------------------------------------------------------------------------- + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" ORDER BY "tasks"."id" ASC LIMIT $1 [["LIMIT", 1]] + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 298486374], ["LIMIT", 1]] +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started PATCH "/tasks/298486374" for 127.0.0.1 at 2019-04-13 07:11:33 -0700 +Processing by TasksController#update as HTML + Parameters: {"id"=>"298486374"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 298486374], ["LIMIT", 1]] +Completed 400 Bad Request in 2ms (ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-13 07:11:33 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-13 14:11:33.976634"], ["updated_at", "2019-04-13 14:11:33.976634"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190964/edit" for 127.0.0.1 at 2019-04-13 07:11:33 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190964"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190964], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (8.0ms) + Rendered tasks/edit.html.erb within layouts/application (10.0ms) +Completed 200 OK in 153ms (Views: 150.4ms | ActiveRecord: 0.3ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-13 14:11:34.135939"], ["updated_at", "2019-04-13 14:11:34.135939"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190965" for 127.0.0.1 at 2019-04-13 07:11:34 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190965"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Task Destroy (0.2ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190965]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.7ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."description" = $1 LIMIT $2 [["description", "Read one book per week"], ["LIMIT", 1]] +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-13 07:11:34 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (2.0ms) + Rendered tasks/new.html.erb within layouts/application (2.8ms) +Completed 200 OK in 5ms (Views: 4.5ms | ActiveRecord: 0.0ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.1ms) ROLLBACK +  (0.3ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.5ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-13 07:11:34 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +Unpermitted parameter: :completed +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-13 14:11:34.163332"], ["updated_at", "2019-04-13 14:11:34.163332"]] +  (0.4ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 4ms (ActiveRecord: 1.0ms) +  (0.4ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-13 07:11:34 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.4ms) +Completed 200 OK in 5ms (Views: 4.1ms | ActiveRecord: 0.4ms) +  (0.8ms) ROLLBACK +  (0.3ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-13 07:11:34 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.7ms) +Completed 200 OK in 4ms (Views: 3.1ms | ActiveRecord: 0.4ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-13 07:11:34 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.6ms) SAVEPOINT active_record_1 + Task Create (0.5ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-13 14:11:34.199586"], ["updated_at", "2019-04-13 14:11:34.199586"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190967" for 127.0.0.1 at 2019-04-13 07:11:34 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190967"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.4ms) +Completed 200 OK in 4ms (Views: 2.0ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) BEGIN +  (0.4ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.5ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-13 14:14:45.732788', '2019-04-13 14:14:45.732788'), (298486374, 'MyString', 'MyString', NULL, '2019-04-13 14:14:45.732788', '2019-04-13 14:14:45.732788') +  (1.0ms) COMMIT +  (0.2ms) BEGIN +  (0.3ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.2ms) COMMIT +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-13 14:14:45.759099"], ["updated_at", "2019-04-13 14:14:45.759099"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190963" for 127.0.0.1 at 2019-04-13 07:14:45 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190963"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Task Destroy (0.3ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190963]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 9ms (ActiveRecord: 1.0ms) +  (0.4ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."description" = $1 LIMIT $2 [["description", "Read one book per week"], ["LIMIT", 1]] +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-13 07:14:45 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.3ms) +Completed 200 OK in 151ms (Views: 150.1ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-13 07:14:45 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.4ms) +Completed 200 OK in 3ms (Views: 2.6ms | ActiveRecord: 0.3ms) +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-13 07:14:45 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (9.6ms) + Rendered tasks/new.html.erb within layouts/application (11.0ms) +Completed 200 OK in 14ms (Views: 13.2ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-13 07:14:45 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +Unpermitted parameter: :completed +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.5ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-13 14:14:45.973873"], ["updated_at", "2019-04-13 14:14:45.973873"]] +  (0.4ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 4ms (ActiveRecord: 1.1ms) +  (0.4ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (1.1ms) ROLLBACK +  (0.2ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (1.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-13 14:14:45.984548"], ["updated_at", "2019-04-13 14:14:45.984548"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190965/edit" for 127.0.0.1 at 2019-04-13 07:14:45 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190965"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (2.7ms) + Rendered tasks/edit.html.erb within layouts/application (3.5ms) +Completed 200 OK in 7ms (Views: 5.1ms | ActiveRecord: 0.3ms) +  (0.5ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-13 07:14:46 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.8ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.8ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-13 14:14:46.007462"], ["updated_at", "2019-04-13 14:14:46.007462"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190966" for 127.0.0.1 at 2019-04-13 07:14:46 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190966"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190966], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (1.0ms) +Completed 200 OK in 7ms (Views: 3.8ms | ActiveRecord: 0.4ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-13 07:14:46 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.3ms) ROLLBACK +  (0.4ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "making a new one"], ["created_at", "2019-04-13 14:14:46.033417"], ["updated_at", "2019-04-13 14:14:46.033417"]] +  (0.5ms) RELEASE SAVEPOINT active_record_1 +Started PATCH "/tasks/980190967" for 127.0.0.1 at 2019-04-13 07:14:46 -0700 +Processing by TasksController#update as HTML + Parameters: {"task"=>{"name"=>"not new"}, "id"=>"980190967"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] +  (0.2ms) SAVEPOINT active_record_1 + Task Update (0.4ms) UPDATE "tasks" SET "name" = $1, "updated_at" = $2 WHERE "tasks"."id" = $3 [["name", "not new"], ["updated_at", "2019-04-13 14:14:46.039993"], ["id", 980190967]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks/980190967 +Completed 302 Found in 4ms (ActiveRecord: 1.0ms) + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.8ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +Started PATCH "/tasks/55" for 127.0.0.1 at 2019-04-13 07:14:46 -0700 +Processing by TasksController#update as HTML + Parameters: {"id"=>"55"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 55], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.3ms) +  (2.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------- +TasksController::update: test_0003_will not update if the params are invelid +---------------------------------------------------------------------------- + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" ORDER BY "tasks"."id" ASC LIMIT $1 [["LIMIT", 1]] + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 298486374], ["LIMIT", 1]] +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started PATCH "/tasks/298486374" for 127.0.0.1 at 2019-04-13 07:14:46 -0700 +Processing by TasksController#update as HTML + Parameters: {"id"=>"298486374"} + Task Load (0.6ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 298486374], ["LIMIT", 1]] +Completed 400 Bad Request in 3ms (ActiveRecord: 0.6ms) +  (0.6ms) ROLLBACK +  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) BEGIN +  (0.8ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.2ms) COMMIT +  (0.2ms) BEGIN + Fixtures Load (0.6ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-13 14:20:44.780582', '2019-04-13 14:20:44.780582'), (298486374, 'MyString', 'MyString', NULL, '2019-04-13 14:20:44.780582', '2019-04-13 14:20:44.780582') +  (0.8ms) COMMIT +  (0.1ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-13 07:20:44 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +Unpermitted parameter: :completed +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-13 14:20:44.819743"], ["updated_at", "2019-04-13 14:20:44.819743"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 16ms (ActiveRecord: 0.7ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-13 07:20:44 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (8.4ms) + Rendered tasks/new.html.erb within layouts/application (9.9ms) +Completed 200 OK in 240ms (Views: 238.3ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-13 14:20:45.075825"], ["updated_at", "2019-04-13 14:20:45.075825"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190964" for 127.0.0.1 at 2019-04-13 07:20:45 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190964"} + Task Load (0.6ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190964], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Task Destroy (0.3ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190964]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 4ms (ActiveRecord: 1.1ms) +  (0.2ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."description" = $1 LIMIT $2 [["description", "Read one book per week"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-13 14:20:45.088914"], ["updated_at", "2019-04-13 14:20:45.088914"]] +  (0.4ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190965/edit" for 127.0.0.1 at 2019-04-13 07:20:45 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190965"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (1.2ms) + Rendered tasks/edit.html.erb within layouts/application (1.8ms) +Completed 200 OK in 5ms (Views: 3.3ms | ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-13 07:20:45 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-13 07:20:45 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.5ms) +  (0.5ms) ROLLBACK +  (0.2ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-13 14:20:45.115065"], ["updated_at", "2019-04-13 14:20:45.115065"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190966" for 127.0.0.1 at 2019-04-13 07:20:45 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190966"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190966], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.5ms) +Completed 200 OK in 4ms (Views: 1.9ms | ActiveRecord: 0.3ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-13 07:20:45 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.4ms) +Completed 200 OK in 6ms (Views: 4.0ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-13 07:20:45 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.5ms) +Completed 200 OK in 3ms (Views: 2.5ms | ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "making a new one"], ["created_at", "2019-04-13 14:20:45.143832"], ["updated_at", "2019-04-13 14:20:45.143832"]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Started PATCH "/tasks/980190967" for 127.0.0.1 at 2019-04-13 07:20:45 -0700 +Processing by TasksController#update as HTML + Parameters: {"task"=>{"name"=>"not new"}, "id"=>"980190967"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] +  (0.2ms) SAVEPOINT active_record_1 + Task Update (0.5ms) UPDATE "tasks" SET "name" = $1, "updated_at" = $2 WHERE "tasks"."id" = $3 [["name", "not new"], ["updated_at", "2019-04-13 14:20:45.151574"], ["id", 980190967]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks/980190967 +Completed 302 Found in 5ms (ActiveRecord: 1.2ms) + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +Started PATCH "/tasks/55" for 127.0.0.1 at 2019-04-13 07:20:45 -0700 +Processing by TasksController#update as HTML + Parameters: {"id"=>"55"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 55], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.4ms) +  (0.5ms) ROLLBACK +  (0.2ms) BEGIN +---------------------------------------------------------------------------- +TasksController::update: test_0003_will not update if the params are invelid +---------------------------------------------------------------------------- + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" ORDER BY "tasks"."id" ASC LIMIT $1 [["LIMIT", 1]] + Task Load (0.8ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 298486374], ["LIMIT", 1]] +  (0.7ms) SELECT COUNT(*) FROM "tasks" +Started PATCH "/tasks/298486374" for 127.0.0.1 at 2019-04-13 07:20:45 -0700 +Processing by TasksController#update as HTML + Parameters: {"id"=>"298486374"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 298486374], ["LIMIT", 1]] +Completed 400 Bad Request in 2ms (ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.1ms) BEGIN +  (0.7ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.7ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-13 14:24:16.676161', '2019-04-13 14:24:16.676161'), (298486374, 'MyString', 'MyString', NULL, '2019-04-13 14:24:16.676161', '2019-04-13 14:24:16.676161') +  (0.8ms) COMMIT +  (0.1ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.2ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "making a new one"], ["created_at", "2019-04-13 14:24:16.700030"], ["updated_at", "2019-04-13 14:24:16.700030"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started PATCH "/tasks/980190963" for 127.0.0.1 at 2019-04-13 07:24:16 -0700 +Processing by TasksController#update as HTML + Parameters: {"task"=>{"name"=>"not new"}, "id"=>"980190963"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] +  (0.2ms) SAVEPOINT active_record_1 + Task Update (0.7ms) UPDATE "tasks" SET "name" = $1, "updated_at" = $2 WHERE "tasks"."id" = $3 [["name", "not new"], ["updated_at", "2019-04-13 14:24:16.721676"], ["id", 980190963]] +  (0.4ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks/980190963 +Completed 302 Found in 13ms (ActiveRecord: 1.7ms) + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +Started PATCH "/tasks/55" for 127.0.0.1 at 2019-04-13 07:24:16 -0700 +Processing by TasksController#update as HTML + Parameters: {"id"=>"55"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 55], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.3ms) +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------- +TasksController::update: test_0003_will not update if the params are invelid +---------------------------------------------------------------------------- + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" ORDER BY "tasks"."id" ASC LIMIT $1 [["LIMIT", 1]] + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 298486374], ["LIMIT", 1]] +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started PATCH "/tasks/298486374" for 127.0.0.1 at 2019-04-13 07:24:16 -0700 +Processing by TasksController#update as HTML + Parameters: {"id"=>"298486374"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 298486374], ["LIMIT", 1]] +Completed 400 Bad Request in 2ms (ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-13 07:24:16 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.5ms) +Completed 200 OK in 247ms (Views: 245.2ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-13 07:24:16 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.2ms) +Completed 200 OK in 3ms (Views: 2.1ms | ActiveRecord: 0.3ms) +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.2ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-13 07:24:17 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +Unpermitted parameter: :completed +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-13 14:24:17.006518"], ["updated_at", "2019-04-13 14:24:17.006518"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 0.7ms) +  (0.4ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-13 07:24:17 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (8.0ms) + Rendered tasks/new.html.erb within layouts/application (9.1ms) +Completed 200 OK in 12ms (Views: 11.2ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-13 14:24:17.034585"], ["updated_at", "2019-04-13 14:24:17.034585"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190965" for 127.0.0.1 at 2019-04-13 07:24:17 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190965"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.6ms) +Completed 200 OK in 5ms (Views: 2.5ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-13 07:24:17 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 0.4ms) +  (2.0ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-13 07:24:17 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-13 14:24:17.060868"], ["updated_at", "2019-04-13 14:24:17.060868"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190966/edit" for 127.0.0.1 at 2019-04-13 07:24:17 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190966"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190966], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (1.2ms) + Rendered tasks/edit.html.erb within layouts/application (1.7ms) +Completed 200 OK in 5ms (Views: 3.0ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-13 14:24:17.072470"], ["updated_at", "2019-04-13 14:24:17.072470"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190967" for 127.0.0.1 at 2019-04-13 07:24:17 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190967"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] +  (0.2ms) SAVEPOINT active_record_1 + Task Destroy (0.3ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190967]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 0.8ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."description" = $1 LIMIT $2 [["description", "Read one book per week"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.5ms) BEGIN +  (0.4ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.5ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-13 14:27:28.785720', '2019-04-13 14:27:28.785720'), (298486374, 'MyString', 'MyString', NULL, '2019-04-13 14:27:28.785720', '2019-04-13 14:27:28.785720') +  (0.7ms) COMMIT +  (0.1ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.2ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-13 07:27:28 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (9.1ms) +Completed 200 OK in 242ms (Views: 235.5ms | ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-13 07:27:29 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.2ms) +Completed 200 OK in 3ms (Views: 2.1ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-13 14:27:29.062906"], ["updated_at", "2019-04-13 14:27:29.062906"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190963" for 127.0.0.1 at 2019-04-13 07:27:29 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190963"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Task Destroy (0.2ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190963]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 4ms (ActiveRecord: 0.9ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."description" = $1 LIMIT $2 [["description", "Read one book per week"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-13 14:27:29.080007"], ["updated_at", "2019-04-13 14:27:29.080007"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190964" for 127.0.0.1 at 2019-04-13 07:27:29 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190964"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190964], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.6ms) +Completed 200 OK in 5ms (Views: 2.3ms | ActiveRecord: 0.4ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-13 07:27:29 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.6ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.6ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-13 07:27:29 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (8.6ms) + Rendered tasks/new.html.erb within layouts/application (10.3ms) +Completed 200 OK in 14ms (Views: 13.2ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-13 14:27:29.116809"], ["updated_at", "2019-04-13 14:27:29.116809"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190965/edit" for 127.0.0.1 at 2019-04-13 07:27:29 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190965"} + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (2.1ms) + Rendered tasks/edit.html.erb within layouts/application (3.0ms) +Completed 200 OK in 8ms (Views: 5.9ms | ActiveRecord: 0.5ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-13 07:27:29 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.5ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-13 07:27:29 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +Unpermitted parameter: :completed +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.7ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-13 14:27:29.143497"], ["updated_at", "2019-04-13 14:27:29.143497"]] +  (0.5ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 5ms (ActiveRecord: 1.4ms) +  (0.9ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.1ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.5ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "making a new one"], ["created_at", "2019-04-13 14:27:29.158421"], ["updated_at", "2019-04-13 14:27:29.158421"]] +  (0.5ms) RELEASE SAVEPOINT active_record_1 +Started PATCH "/tasks/980190967" for 127.0.0.1 at 2019-04-13 07:27:29 -0700 +Processing by TasksController#update as HTML + Parameters: {"task"=>{"name"=>"not new"}, "id"=>"980190967"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] +  (0.7ms) SAVEPOINT active_record_1 + Task Update (0.5ms) UPDATE "tasks" SET "name" = $1, "updated_at" = $2 WHERE "tasks"."id" = $3 [["name", "not new"], ["updated_at", "2019-04-13 14:27:29.167000"], ["id", 980190967]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks/980190967 +Completed 302 Found in 6ms (ActiveRecord: 1.8ms) + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +Started PATCH "/tasks/55" for 127.0.0.1 at 2019-04-13 07:27:29 -0700 +Processing by TasksController#update as HTML + Parameters: {"id"=>"55"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 55], ["LIMIT", 1]] +Redirected to http://www.example.com/ +Completed 302 Found in 2ms (ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------- +TasksController::update: test_0003_will not update if the params are invelid +---------------------------------------------------------------------------- + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" ORDER BY "tasks"."id" ASC LIMIT $1 [["LIMIT", 1]] + Task Load (0.8ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 298486374], ["LIMIT", 1]] +  (0.4ms) SELECT COUNT(*) FROM "tasks" +Started PATCH "/tasks/298486374" for 127.0.0.1 at 2019-04-13 07:27:29 -0700 +Processing by TasksController#update as HTML + Parameters: {"id"=>"298486374"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 298486374], ["LIMIT", 1]] +Completed 400 Bad Request in 1ms (ActiveRecord: 0.2ms) +  (0.2ms) ROLLBACK +  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.4ms) BEGIN +  (0.5ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.8ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-13 14:27:50.901031', '2019-04-13 14:27:50.901031'), (298486374, 'MyString', 'MyString', NULL, '2019-04-13 14:27:50.901031', '2019-04-13 14:27:50.901031') +  (0.8ms) COMMIT +  (0.1ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-13 14:27:50.923158"], ["updated_at", "2019-04-13 14:27:50.923158"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190963" for 127.0.0.1 at 2019-04-13 07:27:50 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190963"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Task Destroy (0.2ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190963]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 11ms (ActiveRecord: 0.9ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."description" = $1 LIMIT $2 [["description", "Read one book per week"], ["LIMIT", 1]] +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-13 14:27:50.951222"], ["updated_at", "2019-04-13 14:27:50.951222"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190964/edit" for 127.0.0.1 at 2019-04-13 07:27:50 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190964"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190964], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (8.7ms) + Rendered tasks/edit.html.erb within layouts/application (10.5ms) +Completed 200 OK in 241ms (Views: 239.3ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-13 07:27:51 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.3ms) +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-13 07:27:51 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.8ms) +Completed 200 OK in 4ms (Views: 3.1ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-13 07:27:51 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.2ms) +Completed 200 OK in 3ms (Views: 2.0ms | ActiveRecord: 0.3ms) +  (0.1ms) ROLLBACK +  (0.2ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +Started PATCH "/tasks/55" for 127.0.0.1 at 2019-04-13 07:27:51 -0700 +Processing by TasksController#update as HTML + Parameters: {"id"=>"55"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 55], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.4ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "making a new one"], ["created_at", "2019-04-13 14:27:51.226856"], ["updated_at", "2019-04-13 14:27:51.226856"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started PATCH "/tasks/980190965" for 127.0.0.1 at 2019-04-13 07:27:51 -0700 +Processing by TasksController#update as HTML + Parameters: {"task"=>{"name"=>"not new"}, "id"=>"980190965"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] +  (0.2ms) SAVEPOINT active_record_1 + Task Update (0.6ms) UPDATE "tasks" SET "name" = $1, "updated_at" = $2 WHERE "tasks"."id" = $3 [["name", "not new"], ["updated_at", "2019-04-13 14:27:51.232101"], ["id", 980190965]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks/980190965 +Completed 302 Found in 5ms (ActiveRecord: 1.4ms) + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +---------------------------------------------------------------------------- +TasksController::update: test_0003_will not update if the params are invelid +---------------------------------------------------------------------------- + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" ORDER BY "tasks"."id" ASC LIMIT $1 [["LIMIT", 1]] + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 298486374], ["LIMIT", 1]] +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started PATCH "/tasks/298486374" for 127.0.0.1 at 2019-04-13 07:27:51 -0700 +Processing by TasksController#update as HTML + Parameters: {"id"=>"298486374"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 298486374], ["LIMIT", 1]] +Completed 400 Bad Request in 1ms (ActiveRecord: 0.2ms) +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.5ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-13 07:27:51 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +Unpermitted parameter: :completed +  (0.3ms) SAVEPOINT active_record_1 + Task Create (1.1ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-13 14:27:51.256254"], ["updated_at", "2019-04-13 14:27:51.256254"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 4ms (ActiveRecord: 1.6ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-13 14:27:51.264707"], ["updated_at", "2019-04-13 14:27:51.264707"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190967" for 127.0.0.1 at 2019-04-13 07:27:51 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190967"} + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.6ms) +Completed 200 OK in 6ms (Views: 2.6ms | ActiveRecord: 0.5ms) +  (0.6ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-13 07:27:51 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.2ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-13 07:27:51 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (2.6ms) + Rendered tasks/new.html.erb within layouts/application (3.6ms) +Completed 200 OK in 7ms (Views: 5.8ms | ActiveRecord: 0.0ms) +  (0.4ms) ROLLBACK diff --git a/test/controllers/tasks_controller_test.rb b/test/controllers/tasks_controller_test.rb index ff8031d79..1f3712256 100644 --- a/test/controllers/tasks_controller_test.rb +++ b/test/controllers/tasks_controller_test.rb @@ -143,6 +143,21 @@ must_respond_with :redirect must_redirect_to tasks_path end + it "will not update if the params are invelid" do + id = Task.first.id + original_task = Task.find_by(id: id) + + expect { + patch task_path(id), params: {} + }.wont_change "Task.count" + + must_respond_with :error + + task = Task.find_by(id: id) + expect(task.name).must_equal original_task.name + expect(task.description).must_equal original_task.description + expect(task.completion_date).must_equal original_task.completion_date + end end # Complete these tests for Wave 4 From 8213bea3e8ecb6b454bd458c28309fe6f3a9b571 Mon Sep 17 00:00:00 2001 From: Bitaman Date: Sat, 13 Apr 2019 09:29:28 -0700 Subject: [PATCH 15/16] added the mark complete and unmark complete for tasks in main page and view page --- app/controllers/tasks_controller.rb | 20 +- app/views/tasks/index.html.erb | 23 +- app/views/tasks/show.html.erb | 12 +- config/routes.rb | 2 +- ...413152636_add_completed_column_to_tasks.rb | 5 + db/schema.rb | 3 +- log/development.log | 613 ++++++++++ log/test.log | 1082 +++++++++++++++++ test/controllers/tasks_controller_test.rb | 15 +- 9 files changed, 1750 insertions(+), 25 deletions(-) create mode 100644 db/migrate/20190413152636_add_completed_column_to_tasks.rb diff --git a/app/controllers/tasks_controller.rb b/app/controllers/tasks_controller.rb index 04a3d9478..cb07eac1e 100644 --- a/app/controllers/tasks_controller.rb +++ b/app/controllers/tasks_controller.rb @@ -59,16 +59,16 @@ def destroy redirect_to tasks_path end - # def complete - # @task = Task.find_by(id: params[:id]) - # unless @task - # redirect_to tasks_path - # return - # end - # @task.completed = !@task.completed - # @task.save - # redirect_to root_path - # end + def complete + task = Task.find_by(id: params[:id]) + unless task + head :not_found + return + end + task.completed = !task.completed + task.save + redirect_to tasks_path + end private diff --git a/app/views/tasks/index.html.erb b/app/views/tasks/index.html.erb index d443218b2..b1563e1fb 100644 --- a/app/views/tasks/index.html.erb +++ b/app/views/tasks/index.html.erb @@ -5,12 +5,19 @@
      -<% @tasks.each do |task|%> -
    • -<%= link_to task.name, task_path(task) %> : <%= task.description %> , <%= task.completion_date%> - <%= link_to "Edit", edit_task_path(task.id) %> - <%= link_to "Delete", task_path(task.id), method: :delete, data: {confirm: "are you sure you want to delete this task?"} %> - <%= link_to "Mark complete", tasks_path, class: 'button' %> -
    • -<% end %> + <% @tasks.each do |task|%> +
    • + <%= link_to task.name, task_path(task) %>: <%= task.description %> + <% if task.completion_date %> +

      Due date: <%= task.completion_date%>

      + <% end %> + <%= link_to "Edit", edit_task_path(task.id) %> + <%= link_to "Delete", task_path(task.id), method: :delete, data: {confirm: "are you sure you want to delete this task?"} %> + <% if task.completed %> +

      <%= link_to "Unmark Complete", complete_task_path(task.id), method: :post %>

      + <% else %> +

      <%= link_to "Mark Complete", complete_task_path(task.id), method: :post %>

      + <% end %> +
    • + <% end %>
    \ No newline at end of file diff --git a/app/views/tasks/show.html.erb b/app/views/tasks/show.html.erb index ec2de8bfc..be1b93e7d 100644 --- a/app/views/tasks/show.html.erb +++ b/app/views/tasks/show.html.erb @@ -2,12 +2,16 @@

    Task details page

    -

    -Task: <%= @task.name %> -

    + +Task: <%= @task.name %>

    Description: <%= @task.description %>

    Completion_date: <%= @task.completion_date %> -

    \ No newline at end of file +

    +<% if @task.completed %> +

    <%= link_to "Unmark Complete", complete_task_path(@task), method: :post %>

    +<% else %> +

    <%= link_to "Mark Complete", complete_task_path(@task), method: :post %>

    +<% end %> diff --git a/config/routes.rb b/config/routes.rb index fa3f2ca5f..a84bdfd4d 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -2,5 +2,5 @@ # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html root "tasks#index" resources :tasks - post "/tasks", to: "tasks#complete" + post "/tasks/:id/complete", to: "tasks#complete", as: "complete_task" end diff --git a/db/migrate/20190413152636_add_completed_column_to_tasks.rb b/db/migrate/20190413152636_add_completed_column_to_tasks.rb new file mode 100644 index 000000000..bac371633 --- /dev/null +++ b/db/migrate/20190413152636_add_completed_column_to_tasks.rb @@ -0,0 +1,5 @@ +class AddCompletedColumnToTasks < ActiveRecord::Migration[5.2] + def change + add_column :tasks, :completed, :boolean + end +end diff --git a/db/schema.rb b/db/schema.rb index be432008d..a1922c915 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2019_04_09_232440) do +ActiveRecord::Schema.define(version: 2019_04_13_152636) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -21,6 +21,7 @@ t.datetime "completion_date" t.datetime "created_at", null: false t.datetime "updated_at", null: false + t.boolean "completed" end end diff --git a/log/development.log b/log/development.log index a144c8552..d24f57b62 100644 --- a/log/development.log +++ b/log/development.log @@ -2786,3 +2786,616 @@ Processing by TasksController#index as HTML Completed 200 OK in 30ms (Views: 24.5ms | ActiveRecord: 2.8ms) +Started GET "/tasks" for ::1 at 2019-04-13 07:45:05 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (1.1ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (23.4ms) +Completed 500 Internal Server Error in 28ms (ActiveRecord: 7.9ms) + + + +NoMethodError - undefined method `complete' for # +Did you mean? completion_date: + app/views/tasks/index.html.erb:17:in `block in _app_views_tasks_index_html_erb__284753556052239055_70114334952960' + app/views/tasks/index.html.erb:8:in `_app_views_tasks_index_html_erb__284753556052239055_70114334952960' + +Started POST "/__better_errors/3e9c5fd0bf356819/variables" for ::1 at 2019-04-13 07:45:05 -0700 +Started GET "/tasks" for ::1 at 2019-04-13 07:50:15 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (20.0ms) +Completed 500 Internal Server Error in 25ms (ActiveRecord: 3.9ms) + + + +NoMethodError - undefined method `toggle_complete' for #: + app/views/tasks/index.html.erb:17:in `block in _app_views_tasks_index_html_erb__284753556052239055_70114343212380' + app/views/tasks/index.html.erb:8:in `_app_views_tasks_index_html_erb__284753556052239055_70114343212380' + +Started POST "/__better_errors/d1365dd0da96a5bb/variables" for ::1 at 2019-04-13 07:50:15 -0700 +Started GET "/tasks" for ::1 at 2019-04-13 08:05:32 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.7ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (21.1ms) +Completed 500 Internal Server Error in 27ms (ActiveRecord: 7.8ms) + + + +NoMethodError - undefined method `complete' for # +Did you mean? completion_date: + app/views/tasks/index.html.erb:17:in `block in _app_views_tasks_index_html_erb__284753556052239055_70114300466960' + app/views/tasks/index.html.erb:8:in `_app_views_tasks_index_html_erb__284753556052239055_70114300466960' + +Started POST "/__better_errors/47ddfc3e75402d8c/variables" for ::1 at 2019-04-13 08:05:33 -0700 +Started GET "/tasks" for ::1 at 2019-04-13 08:28:10 -0700 +  (0.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC + ↳ /Users/bitaamani/.rvm/gems/ruby-2.6.0/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:98 + +ActiveRecord::PendingMigrationError - Migrations are pending. To resolve this issue, run: + + bin/rails db:migrate RAILS_ENV=development + +: + +Started POST "/__better_errors/4627cc7f1ccb4846/variables" for ::1 at 2019-04-13 08:28:10 -0700 +  (2.1ms) SELECT pg_try_advisory_lock(4169262226251541860) + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:273 +  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:273 +Migrating to AddCompletedColumnToTasks (20190413152636) +  (0.3ms) BEGIN + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:273 +  (0.2ms) ROLLBACK + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:273 +  (0.3ms) SELECT pg_advisory_unlock(4169262226251541860) + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:273 +  (0.2ms) SELECT pg_try_advisory_lock(4169262226251541860) + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:273 +  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:273 +Migrating to AddCompletedColumnToTasks (20190413152636) +  (0.2ms) BEGIN + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:273 +  (4.4ms) ALTER TABLE "tasks" ADD "completed" boolean + ↳ db/migrate/20190413152636_add_completed_column_to_tasks.rb:3 + ActiveRecord::SchemaMigration Create (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20190413152636"]] + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:273 +  (0.5ms) COMMIT + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:273 + ActiveRecord::InternalMetadata Load (0.6ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]] + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:273 +  (0.2ms) BEGIN + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:273 +  (0.1ms) COMMIT + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:273 +  (0.2ms) SELECT pg_advisory_unlock(4169262226251541860) + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:273 +  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC + ↳ /Users/bitaamani/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:273 +Started GET "/tasks" for ::1 at 2019-04-13 08:30:00 -0700 +  (0.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC + ↳ /Users/bitaamani/.rvm/gems/ruby-2.6.0/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:98 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.7ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (25.1ms) +Completed 500 Internal Server Error in 31ms (ActiveRecord: 7.9ms) + + + +NoMethodError - undefined method `complete' for # +Did you mean? completed + completed= + completed?: + app/views/tasks/index.html.erb:17:in `block in _app_views_tasks_index_html_erb__284753556052239055_70114307580100' + app/views/tasks/index.html.erb:8:in `_app_views_tasks_index_html_erb__284753556052239055_70114307580100' + +Started POST "/__better_errors/3f09486580591b97/variables" for ::1 at 2019-04-13 08:30:00 -0700 +Started GET "/tasks" for ::1 at 2019-04-13 08:31:49 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (234.5ms) +Completed 500 Internal Server Error in 239ms (ActiveRecord: 0.4ms) + + + +NoMethodError - undefined method `complete_tasks_path' for #<#:0x00007f89887a8780> +Did you mean? complete_task_path + complete_task_url: + app/views/tasks/index.html.erb:20:in `block in _app_views_tasks_index_html_erb__284753556052239055_70114338490600' + app/views/tasks/index.html.erb:8:in `_app_views_tasks_index_html_erb__284753556052239055_70114338490600' + +Started POST "/__better_errors/ebbc2c8f0f5538c9/variables" for ::1 at 2019-04-13 08:31:49 -0700 +Started GET "/" for ::1 at 2019-04-13 08:35:45 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.8ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (301.4ms) +Completed 500 Internal Server Error in 307ms (ActiveRecord: 6.1ms) + + + +NoMethodError - undefined method `complete_tasks_path' for #<#:0x00007f898534ae98> +Did you mean? complete_task_path + complete_task_url: + app/views/tasks/index.html.erb:20:in `block in _app_views_tasks_index_html_erb__284753556052239055_70114311062640' + app/views/tasks/index.html.erb:8:in `_app_views_tasks_index_html_erb__284753556052239055_70114311062640' + +Started POST "/__better_errors/984bd7b28085ca52/variables" for ::1 at 2019-04-13 08:35:45 -0700 +Started GET "/" for ::1 at 2019-04-13 08:36:30 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (284.9ms) +Completed 500 Internal Server Error in 290ms (ActiveRecord: 4.1ms) + + + +NoMethodError - undefined method `complete_tasks_path' for #<#:0x00007f8983ee9990> +Did you mean? complete_task_path + complete_task_url: + app/views/tasks/index.html.erb:20:in `block in _app_views_tasks_index_html_erb__284753556052239055_70114300354260' + app/views/tasks/index.html.erb:8:in `_app_views_tasks_index_html_erb__284753556052239055_70114300354260' + +Started POST "/__better_errors/d43d66a7e7c731ca/variables" for ::1 at 2019-04-13 08:36:30 -0700 +Started GET "/tasks" for ::1 at 2019-04-13 08:42:50 -0700 +  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC + ↳ /Users/bitaamani/.rvm/gems/ruby-2.6.0/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:98 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.6ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (195.9ms) +Completed 500 Internal Server Error in 206ms (ActiveRecord: 4.4ms) + + + +NoMethodError - undefined method `complete_tasks_path' for #<#:0x00007feff0c261d0> +Did you mean? complete_task_path + complete_task_url: + app/views/tasks/index.html.erb:20:in `block in _app_views_tasks_index_html_erb___2892978991558193629_70334256572880' + app/views/tasks/index.html.erb:8:in `_app_views_tasks_index_html_erb___2892978991558193629_70334256572880' + +Started POST "/__better_errors/f909bbf3cf7161e0/variables" for ::1 at 2019-04-13 08:42:51 -0700 +Started GET "/tasks" for ::1 at 2019-04-13 08:49:00 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.8ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (525.6ms) +Completed 500 Internal Server Error in 530ms (ActiveRecord: 0.8ms) + + + +NameError - undefined local variable or method `tasks' for #<#:0x00007fefed1132f0> +Did you mean? @tasks: + app/views/tasks/index.html.erb:8:in `_app_views_tasks_index_html_erb___2892978991558193629_70334225602460' + +Started POST "/__better_errors/771cbdae75bc572a/variables" for ::1 at 2019-04-13 08:49:01 -0700 +Started GET "/tasks" for ::1 at 2019-04-13 08:51:46 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (475.2ms) +Completed 500 Internal Server Error in 479ms (ActiveRecord: 0.4ms) + + + +NameError - undefined local variable or method `tasks' for #<#:0x00007feff0a58f38> +Did you mean? @tasks: + app/views/tasks/index.html.erb:8:in `_app_views_tasks_index_html_erb___2892978991558193629_70334255647820' + +Started POST "/__better_errors/473d1fb99593567c/variables" for ::1 at 2019-04-13 08:51:47 -0700 +Started GET "/" for ::1 at 2019-04-13 08:51:54 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (1.7ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (409.3ms) +Completed 500 Internal Server Error in 414ms (ActiveRecord: 1.7ms) + + + +NameError - undefined local variable or method `tasks' for #<#:0x00007fefedc633f8> +Did you mean? @tasks: + app/views/tasks/index.html.erb:8:in `_app_views_tasks_index_html_erb___2892978991558193629_70334231499600' + +Started POST "/__better_errors/d8e0285139f37512/variables" for ::1 at 2019-04-13 08:51:55 -0700 +Started GET "/" for ::1 at 2019-04-13 08:52:14 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (239.4ms) +Completed 500 Internal Server Error in 243ms (ActiveRecord: 0.4ms) + + + +NoMethodError - undefined method `complete_tasks_path' for #<#:0x00007fefeea0f768> +Did you mean? complete_task_path + complete_task_url: + app/views/tasks/index.html.erb:20:in `block in _app_views_tasks_index_html_erb___2892978991558193629_70334238666140' + app/views/tasks/index.html.erb:8:in `_app_views_tasks_index_html_erb___2892978991558193629_70334238666140' + +Started POST "/__better_errors/79fdaea9422625da/variables" for ::1 at 2019-04-13 08:52:14 -0700 +Started POST "/__better_errors/79fdaea9422625da/variables" for ::1 at 2019-04-13 08:53:54 -0700 +Started GET "/" for ::1 at 2019-04-13 08:54:59 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (253.7ms) +Completed 500 Internal Server Error in 258ms (ActiveRecord: 0.4ms) + + + +NoMethodError - undefined method `complete_tasks_path' for #<#:0x00007fefee150758> +Did you mean? complete_task_path + complete_task_url: + app/views/tasks/index.html.erb:20:in `block in _app_views_tasks_index_html_erb___2892978991558193629_70334234134520' + app/views/tasks/index.html.erb:8:in `_app_views_tasks_index_html_erb___2892978991558193629_70334234134520' + +Started POST "/__better_errors/e68c934f0ea32474/variables" for ::1 at 2019-04-13 08:54:59 -0700 +Started GET "/" for ::1 at 2019-04-13 08:55:42 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (282.4ms) +Completed 500 Internal Server Error in 287ms (ActiveRecord: 0.4ms) + + + +NoMethodError - undefined method `complete_tasks_path' for #<#:0x00007fefed188398> +Did you mean? complete_task_path + complete_task_url: + app/views/tasks/index.html.erb:20:in `block in _app_views_tasks_index_html_erb___2892978991558193629_70334225860400' + app/views/tasks/index.html.erb:8:in `_app_views_tasks_index_html_erb___2892978991558193629_70334225860400' + +Started POST "/__better_errors/13c1d8fe94fd491f/variables" for ::1 at 2019-04-13 08:55:43 -0700 +Started GET "/" for ::1 at 2019-04-13 08:56:06 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (1.2ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (5.4ms) +Completed 200 OK in 254ms (Views: 250.8ms | ActiveRecord: 1.2ms) + + +Started GET "/" for ::1 at 2019-04-13 08:57:20 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (4.3ms) +Completed 200 OK in 21ms (Views: 19.2ms | ActiveRecord: 0.4ms) + + +Started POST "/tasks/6/complete" for ::1 at 2019-04-13 08:57:29 -0700 +Processing by TasksController#complete as HTML + Parameters: {"authenticity_token"=>"ibw4UWlvF+lTgA8cRuCB0/XBI8sPtR7dE3oH34OY+eL0GhkHdIr3Q9h7TM4VLTpzqTlDbb4wnKsKBQ+C3JUD4g==", "id"=>"6"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 6], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:63 +  (0.2ms) BEGIN + ↳ app/controllers/tasks_controller.rb:69 + Task Update (0.5ms) UPDATE "tasks" SET "completed" = $1, "updated_at" = $2 WHERE "tasks"."id" = $3 [["completed", true], ["updated_at", "2019-04-13 15:57:29.287237"], ["id", 6]] + ↳ app/controllers/tasks_controller.rb:69 +  (0.9ms) COMMIT + ↳ app/controllers/tasks_controller.rb:69 +Redirected to http://localhost:3000/tasks +Completed 302 Found in 7ms (ActiveRecord: 2.1ms) + + +Started GET "/tasks" for ::1 at 2019-04-13 08:57:29 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (3.5ms) +Completed 200 OK in 20ms (Views: 18.1ms | ActiveRecord: 0.5ms) + + +Started POST "/tasks/3/complete" for ::1 at 2019-04-13 08:57:37 -0700 +Processing by TasksController#complete as HTML + Parameters: {"authenticity_token"=>"icuIx2RK+h/yFn+AX5iV8w2qHFlA9RtePIRIpoR1qvL0bamRea8atXntPFIMVS5TUVJ8//FwmSgl+0D723hQ8g==", "id"=>"3"} + Task Load (1.0ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 3], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:63 +  (0.4ms) BEGIN + ↳ app/controllers/tasks_controller.rb:69 + Task Update (0.4ms) UPDATE "tasks" SET "completed" = $1, "updated_at" = $2 WHERE "tasks"."id" = $3 [["completed", true], ["updated_at", "2019-04-13 15:57:37.885858"], ["id", 3]] + ↳ app/controllers/tasks_controller.rb:69 +  (0.4ms) COMMIT + ↳ app/controllers/tasks_controller.rb:69 +Redirected to http://localhost:3000/tasks +Completed 302 Found in 7ms (ActiveRecord: 2.2ms) + + +Started GET "/tasks" for ::1 at 2019-04-13 08:57:37 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (3.9ms) +Completed 200 OK in 24ms (Views: 21.8ms | ActiveRecord: 0.4ms) + + +Started POST "/tasks/10/complete" for ::1 at 2019-04-13 08:57:39 -0700 +Processing by TasksController#complete as HTML + Parameters: {"authenticity_token"=>"jNjqdTc6aWQ2xj51OKCEX5pnKLDCZ/rwE0NpOAMFeiTxfssjKt+Jzr09fadrbT//xp9IFnPieIYKPGFlXAiAJA==", "id"=>"10"} + Task Load (2.9ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 10], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:63 +  (0.2ms) BEGIN + ↳ app/controllers/tasks_controller.rb:69 + Task Update (0.5ms) UPDATE "tasks" SET "completed" = $1, "updated_at" = $2 WHERE "tasks"."id" = $3 [["completed", true], ["updated_at", "2019-04-13 15:57:39.285735"], ["id", 10]] + ↳ app/controllers/tasks_controller.rb:69 +  (0.5ms) COMMIT + ↳ app/controllers/tasks_controller.rb:69 +Redirected to http://localhost:3000/tasks +Completed 302 Found in 8ms (ActiveRecord: 4.0ms) + + +Started GET "/tasks" for ::1 at 2019-04-13 08:57:39 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (4.2ms) +Completed 200 OK in 27ms (Views: 24.7ms | ActiveRecord: 0.4ms) + + +Started POST "/tasks/9/complete" for ::1 at 2019-04-13 08:57:40 -0700 +Processing by TasksController#complete as HTML + Parameters: {"authenticity_token"=>"1jdvXyrojYU/tjTrH5947QGhiX2R/IBJSL+BorwUxIurkU4JNw1tL7RNdzlMUsNNXVnp2yB5Aj9RwIn/4xk+iw==", "id"=>"9"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 9], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:63 +  (0.2ms) BEGIN + ↳ app/controllers/tasks_controller.rb:69 + Task Update (0.4ms) UPDATE "tasks" SET "completed" = $1, "updated_at" = $2 WHERE "tasks"."id" = $3 [["completed", true], ["updated_at", "2019-04-13 15:57:40.505067"], ["id", 9]] + ↳ app/controllers/tasks_controller.rb:69 +  (0.8ms) COMMIT + ↳ app/controllers/tasks_controller.rb:69 +Redirected to http://localhost:3000/tasks +Completed 302 Found in 5ms (ActiveRecord: 1.7ms) + + +Started GET "/tasks" for ::1 at 2019-04-13 08:57:40 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (3.7ms) +Completed 200 OK in 24ms (Views: 22.0ms | ActiveRecord: 0.3ms) + + +Started POST "/tasks/3/complete" for ::1 at 2019-04-13 08:57:47 -0700 +Processing by TasksController#complete as HTML + Parameters: {"authenticity_token"=>"YkhIK12bOONYkcXgWcW+AlUxP6rZPhAKSxkhPvDgl3Uf7ml9QH7YSdNqhjIKCAWiCclfDGi7knxSZiljr+1tdQ==", "id"=>"3"} + Task Load (1.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 3], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:63 +  (0.2ms) BEGIN + ↳ app/controllers/tasks_controller.rb:69 + Task Update (0.6ms) UPDATE "tasks" SET "completed" = $1, "updated_at" = $2 WHERE "tasks"."id" = $3 [["completed", false], ["updated_at", "2019-04-13 15:57:47.254041"], ["id", 3]] + ↳ app/controllers/tasks_controller.rb:69 +  (1.0ms) COMMIT + ↳ app/controllers/tasks_controller.rb:69 +Redirected to http://localhost:3000/tasks +Completed 302 Found in 9ms (ActiveRecord: 3.3ms) + + +Started GET "/tasks" for ::1 at 2019-04-13 08:57:47 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (4.1ms) +Completed 200 OK in 24ms (Views: 21.7ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks/7/edit" for ::1 at 2019-04-13 08:59:47 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"7"} + Task Load (1.9ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 7], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:35 + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (20.8ms) + Rendered tasks/edit.html.erb within layouts/application (22.6ms) +Completed 200 OK in 44ms (Views: 38.5ms | ActiveRecord: 1.9ms) + + +Started GET "/tasks/new" for ::1 at 2019-04-13 08:59:56 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (3.7ms) + Rendered tasks/new.html.erb within layouts/application (5.6ms) +Completed 200 OK in 61ms (Views: 58.5ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for ::1 at 2019-04-13 08:59:59 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (5.5ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (11.2ms) +Completed 200 OK in 38ms (Views: 30.7ms | ActiveRecord: 5.5ms) + + +Started GET "/tasks/2" for ::1 at 2019-04-13 09:00:11 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"2"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 2], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:12 + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.6ms) +Completed 200 OK in 25ms (Views: 21.5ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks/2" for ::1 at 2019-04-13 09:01:36 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"2"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 2], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:12 + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.9ms) +Completed 200 OK in 21ms (Views: 18.2ms | ActiveRecord: 0.4ms) + + +Started GET "/tasks/2" for ::1 at 2019-04-13 09:02:54 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"2"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 2], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:12 + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (455.9ms) +Completed 500 Internal Server Error in 461ms (ActiveRecord: 0.3ms) + + + +NameError - undefined local variable or method `task' for #<#:0x00007fefee22aac0> +Did you mean? @task: + app/views/tasks/show.html.erb:13:in `_app_views_tasks_show_html_erb___2548879669387376019_70334234581380' + +Started POST "/__better_errors/f4649ee0ecbe4483/variables" for ::1 at 2019-04-13 09:02:55 -0700 +Started GET "/tasks/2" for ::1 at 2019-04-13 09:03:24 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"2"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 2], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:12 + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (438.9ms) +Completed 500 Internal Server Error in 444ms (ActiveRecord: 0.3ms) + + + +NameError - undefined local variable or method `task' for #<#:0x00007fefeed81b30> +Did you mean? @task: + app/views/tasks/show.html.erb:16:in `_app_views_tasks_show_html_erb___2548879669387376019_70334240528400' + +Started POST "/__better_errors/06770266003d6442/variables" for ::1 at 2019-04-13 09:03:25 -0700 +Started GET "/tasks/2" for ::1 at 2019-04-13 09:04:06 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"2"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 2], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:12 + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.8ms) +Completed 200 OK in 22ms (Views: 19.9ms | ActiveRecord: 0.3ms) + + +Started POST "/tasks/2/complete" for ::1 at 2019-04-13 09:04:09 -0700 +Processing by TasksController#complete as HTML + Parameters: {"authenticity_token"=>"b1KLWBbPWMfiTUfI/BM5OFcXepeXdM0WFklEbzQTqIcS9KoOCyq4bWm2BBqv3oKYC+8aMSbxT2APNkwyax5Shw==", "id"=>"2"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 2], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:63 +  (0.3ms) BEGIN + ↳ app/controllers/tasks_controller.rb:69 + Task Update (0.6ms) UPDATE "tasks" SET "completed" = $1, "updated_at" = $2 WHERE "tasks"."id" = $3 [["completed", true], ["updated_at", "2019-04-13 16:04:09.326175"], ["id", 2]] + ↳ app/controllers/tasks_controller.rb:69 +  (0.6ms) COMMIT + ↳ app/controllers/tasks_controller.rb:69 +Redirected to http://localhost:3000/tasks +Completed 302 Found in 7ms (ActiveRecord: 1.8ms) + + +Started GET "/tasks" for ::1 at 2019-04-13 09:04:09 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (3.2ms) +Completed 200 OK in 30ms (Views: 28.7ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks/7" for ::1 at 2019-04-13 09:04:20 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"7"} + Task Load (1.0ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 7], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:12 + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (2.2ms) +Completed 200 OK in 40ms (Views: 34.8ms | ActiveRecord: 1.0ms) + + +Started POST "/tasks/7/complete" for ::1 at 2019-04-13 09:04:22 -0700 +Processing by TasksController#complete as HTML + Parameters: {"authenticity_token"=>"XsLAuM9AbHibUhR5kV0qin59yj7pDtlkbOBDEG5tWI4jZOHu0qWM0hCpV6vCkJEqIoWqmFiLWxJ1n0tNMWCijg==", "id"=>"7"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 7], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:63 +  (0.5ms) BEGIN + ↳ app/controllers/tasks_controller.rb:69 + Task Update (0.5ms) UPDATE "tasks" SET "completed" = $1, "updated_at" = $2 WHERE "tasks"."id" = $3 [["completed", true], ["updated_at", "2019-04-13 16:04:22.697033"], ["id", 7]] + ↳ app/controllers/tasks_controller.rb:69 +  (0.6ms) COMMIT + ↳ app/controllers/tasks_controller.rb:69 +Redirected to http://localhost:3000/tasks +Completed 302 Found in 8ms (ActiveRecord: 2.0ms) + + +Started GET "/tasks" for ::1 at 2019-04-13 09:04:22 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (4.6ms) +Completed 200 OK in 26ms (Views: 24.6ms | ActiveRecord: 0.3ms) + + +Started POST "/tasks/10/complete" for ::1 at 2019-04-13 09:19:28 -0700 +Processing by TasksController#complete as HTML + Parameters: {"authenticity_token"=>"AW6khZcBrZACOPTg11/gPIGovadXxxiTDYbeJ4sin9F8yIXTiuRNOonDtzKEkluc3VDdAeZCmuUU+dZ61C9l0Q==", "id"=>"10"} + Task Load (1.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 10], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:63 +  (0.2ms) BEGIN + ↳ app/controllers/tasks_controller.rb:69 + Task Update (0.8ms) UPDATE "tasks" SET "completed" = $1, "updated_at" = $2 WHERE "tasks"."id" = $3 [["completed", false], ["updated_at", "2019-04-13 16:19:28.888421"], ["id", 10]] + ↳ app/controllers/tasks_controller.rb:69 +  (0.7ms) COMMIT + ↳ app/controllers/tasks_controller.rb:69 +Redirected to http://localhost:3000/tasks +Completed 302 Found in 9ms (ActiveRecord: 3.1ms) + + +Started GET "/tasks" for ::1 at 2019-04-13 09:19:28 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (5.1ms) +Completed 200 OK in 30ms (Views: 27.8ms | ActiveRecord: 0.5ms) + + +Started POST "/tasks/5/complete" for ::1 at 2019-04-13 09:19:35 -0700 +Processing by TasksController#complete as HTML + Parameters: {"authenticity_token"=>"hd4eFTrFf/m+sbAqEOvVSjY5Y5DmKCOpScH56Ahnx9X4eD9DJyCfUzVK8/hDJm7qasEDNletod9QvvG1V2o91Q==", "id"=>"5"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 5], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:63 +  (0.2ms) BEGIN + ↳ app/controllers/tasks_controller.rb:69 + Task Update (0.5ms) UPDATE "tasks" SET "completed" = $1, "updated_at" = $2 WHERE "tasks"."id" = $3 [["completed", true], ["updated_at", "2019-04-13 16:19:35.467624"], ["id", 5]] + ↳ app/controllers/tasks_controller.rb:69 +  (0.5ms) COMMIT + ↳ app/controllers/tasks_controller.rb:69 +Redirected to http://localhost:3000/tasks +Completed 302 Found in 7ms (ActiveRecord: 1.5ms) + + +Started GET "/tasks" for ::1 at 2019-04-13 09:19:35 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.7ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (6.2ms) +Completed 200 OK in 34ms (Views: 31.1ms | ActiveRecord: 0.7ms) + + diff --git a/log/test.log b/log/test.log index 3267e6d1e..44cb93d86 100644 --- a/log/test.log +++ b/log/test.log @@ -10929,3 +10929,1085 @@ Processing by TasksController#new as HTML Rendered tasks/new.html.erb within layouts/application (3.6ms) Completed 200 OK in 7ms (Views: 5.8ms | ActiveRecord: 0.0ms)  (0.4ms) ROLLBACK +  (1.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.3ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]] +  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]] +  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]] +  (284.0ms) DROP DATABASE IF EXISTS "TaskList_test" +  (559.9ms) CREATE DATABASE "TaskList_test" ENCODING = 'unicode' + SQL (1.3ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (1.1ms) DROP TABLE IF EXISTS "tasks" CASCADE +  (18.6ms) CREATE TABLE "tasks" ("id" bigserial primary key, "name" character varying, "description" character varying, "completion_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "completed" boolean) +  (4.0ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY) +  (0.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES (20190413152636) +  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES +(20190409232440); + + +  (3.4ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) + ActiveRecord::InternalMetadata Load (0.4ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]] +  (0.2ms) BEGIN + ActiveRecord::InternalMetadata Create (0.6ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "test"], ["created_at", "2019-04-13 16:22:19.638937"], ["updated_at", "2019-04-13 16:22:19.638937"]] +  (0.4ms) COMMIT + ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]] +  (0.1ms) BEGIN +  (0.1ms) COMMIT +  (1.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.4ms) BEGIN +  (0.5ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (1.5ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at", "completed") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-13 16:22:19.894731', '2019-04-13 16:22:19.894731', DEFAULT), (298486374, 'MyString', 'MyString', NULL, '2019-04-13 16:22:19.894731', '2019-04-13 16:22:19.894731', DEFAULT) +  (0.7ms) COMMIT +  (0.2ms) BEGIN +  (0.3ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-13 09:22:19 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (5.0ms) + Rendered tasks/new.html.erb within layouts/application (6.2ms) +Completed 200 OK in 159ms (Views: 146.2ms | ActiveRecord: 0.0ms) +  (0.4ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.3ms) SAVEPOINT active_record_1 + Task Create (0.5ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-13 16:22:20.091011"], ["updated_at", "2019-04-13 16:22:20.091011"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190963" for 127.0.0.1 at 2019-04-13 09:22:20 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190963"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (1.1ms) +Completed 200 OK in 11ms (Views: 3.4ms | ActiveRecord: 0.6ms) +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-13 09:22:20 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 0.4ms) +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.6ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-13 09:22:20 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +Unpermitted parameter: :completed +  (0.3ms) SAVEPOINT active_record_1 + Task Create (0.9ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-13 16:22:20.128873"], ["updated_at", "2019-04-13 16:22:20.128873"]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 6ms (ActiveRecord: 1.5ms) +  (0.5ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-13 16:22:20.143540"], ["updated_at", "2019-04-13 16:22:20.143540"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190965" for 127.0.0.1 at 2019-04-13 09:22:20 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190965"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] +  (0.2ms) SAVEPOINT active_record_1 + Task Destroy (0.4ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190965]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 4ms (ActiveRecord: 1.2ms) +  (0.4ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."description" = $1 LIMIT $2 [["description", "Read one book per week"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------- +TasksController::complete: test_0001_will redirect to the main page +------------------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-13 16:22:20.159683"], ["updated_at", "2019-04-13 16:22:20.159683"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started POST "/tasks/980190966/complete" for 127.0.0.1 at 2019-04-13 09:22:20 -0700 +Processing by TasksController#complete as HTML + Parameters: {"id"=>"980190966"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190966], ["LIMIT", 1]] +  (0.2ms) SAVEPOINT active_record_1 + Task Update (0.4ms) UPDATE "tasks" SET "completed" = $1, "updated_at" = $2 WHERE "tasks"."id" = $3 [["completed", true], ["updated_at", "2019-04-13 16:22:20.164990"], ["id", 980190966]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 4ms (ActiveRecord: 1.0ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------------------------------------- +TasksController::complete: test_0002_can mark a task, Mark complete or unmark complete +-------------------------------------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.3ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "making a new one"], ["created_at", "2019-04-13 16:22:20.187631"], ["updated_at", "2019-04-13 16:22:20.187631"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started PATCH "/tasks/980190967" for 127.0.0.1 at 2019-04-13 09:22:20 -0700 +Processing by TasksController#update as HTML + Parameters: {"task"=>{"name"=>"not new"}, "id"=>"980190967"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] +  (0.2ms) SAVEPOINT active_record_1 + Task Update (0.4ms) UPDATE "tasks" SET "name" = $1, "updated_at" = $2 WHERE "tasks"."id" = $3 [["name", "not new"], ["updated_at", "2019-04-13 16:22:20.193700"], ["id", 980190967]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks/980190967 +Completed 302 Found in 4ms (ActiveRecord: 1.0ms) + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +Started PATCH "/tasks/55" for 127.0.0.1 at 2019-04-13 09:22:20 -0700 +Processing by TasksController#update as HTML + Parameters: {"id"=>"55"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 55], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.2ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------- +TasksController::update: test_0003_will not update if the params are invelid +---------------------------------------------------------------------------- + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" ORDER BY "tasks"."id" ASC LIMIT $1 [["LIMIT", 1]] + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 298486374], ["LIMIT", 1]] +  (1.0ms) SELECT COUNT(*) FROM "tasks" +Started PATCH "/tasks/298486374" for 127.0.0.1 at 2019-04-13 09:22:20 -0700 +Processing by TasksController#update as HTML + Parameters: {"id"=>"298486374"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 298486374], ["LIMIT", 1]] +Completed 400 Bad Request in 2ms (ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-13 09:22:20 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.6ms) +Completed 200 OK in 5ms (Views: 3.9ms | ActiveRecord: 0.5ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-13 09:22:20 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.7ms) +Completed 200 OK in 4ms (Views: 2.9ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-13 16:22:20.234733"], ["updated_at", "2019-04-13 16:22:20.234733"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190968/edit" for 127.0.0.1 at 2019-04-13 09:22:20 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190968"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190968], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (1.9ms) + Rendered tasks/edit.html.erb within layouts/application (2.6ms) +Completed 200 OK in 8ms (Views: 4.9ms | ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-13 09:22:20 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.2ms) +  (0.2ms) ROLLBACK +  (0.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.1ms) BEGIN +  (0.4ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (17.3ms) BEGIN + Fixtures Load (0.6ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at", "completed") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-13 16:23:34.997309', '2019-04-13 16:23:34.997309', DEFAULT), (298486374, 'MyString', 'MyString', NULL, '2019-04-13 16:23:34.997309', '2019-04-13 16:23:34.997309', DEFAULT) +  (0.5ms) COMMIT +  (0.1ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +------------------------------------------------------------------- +TasksController::complete: test_0001_will redirect to the main page +------------------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-13 16:23:35.047671"], ["updated_at", "2019-04-13 16:23:35.047671"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started POST "/tasks/980190963/complete" for 127.0.0.1 at 2019-04-13 09:23:35 -0700 +Processing by TasksController#complete as HTML + Parameters: {"id"=>"980190963"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Task Update (0.3ms) UPDATE "tasks" SET "completed" = $1, "updated_at" = $2 WHERE "tasks"."id" = $3 [["completed", true], ["updated_at", "2019-04-13 16:23:35.068182"], ["id", 980190963]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 10ms (ActiveRecord: 0.9ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------------------------------- +TasksController::complete: test_0002_can mark a task, Mark complete or unmark complete +-------------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-13 09:23:35 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (4.4ms) +Completed 200 OK in 149ms (Views: 147.1ms | ActiveRecord: 0.5ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-13 09:23:35 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.6ms) +Completed 200 OK in 4ms (Views: 2.9ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-13 09:23:35 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +Unpermitted parameter: :completed +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.5ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-13 16:23:35.241573"], ["updated_at", "2019-04-13 16:23:35.241573"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 0.8ms) +  (0.6ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.4ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.2ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-13 16:23:35.251224"], ["updated_at", "2019-04-13 16:23:35.251224"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190965" for 127.0.0.1 at 2019-04-13 09:23:35 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190965"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] +  (0.2ms) SAVEPOINT active_record_1 + Task Destroy (0.3ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190965]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 0.9ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."description" = $1 LIMIT $2 [["description", "Read one book per week"], ["LIMIT", 1]] +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-13 16:23:35.261354"], ["updated_at", "2019-04-13 16:23:35.261354"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190966/edit" for 127.0.0.1 at 2019-04-13 09:23:35 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190966"} + Task Load (1.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190966], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (14.2ms) + Rendered tasks/edit.html.erb within layouts/application (16.5ms) +Completed 200 OK in 24ms (Views: 19.2ms | ActiveRecord: 1.3ms) +  (1.2ms) ROLLBACK +  (0.4ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-13 09:23:35 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-13 09:23:35 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (1.3ms) + Rendered tasks/new.html.erb within layouts/application (2.0ms) +Completed 200 OK in 5ms (Views: 3.4ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "making a new one"], ["created_at", "2019-04-13 16:23:35.314126"], ["updated_at", "2019-04-13 16:23:35.314126"]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Started PATCH "/tasks/980190967" for 127.0.0.1 at 2019-04-13 09:23:35 -0700 +Processing by TasksController#update as HTML + Parameters: {"task"=>{"name"=>"not new"}, "id"=>"980190967"} + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] +  (0.3ms) SAVEPOINT active_record_1 + Task Update (0.4ms) UPDATE "tasks" SET "name" = $1, "updated_at" = $2 WHERE "tasks"."id" = $3 [["name", "not new"], ["updated_at", "2019-04-13 16:23:35.321962"], ["id", 980190967]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks/980190967 +Completed 302 Found in 5ms (ActiveRecord: 1.5ms) + Task Load (1.6ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +Started PATCH "/tasks/55" for 127.0.0.1 at 2019-04-13 09:23:35 -0700 +Processing by TasksController#update as HTML + Parameters: {"id"=>"55"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 55], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------- +TasksController::update: test_0003_will not update if the params are invelid +---------------------------------------------------------------------------- + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" ORDER BY "tasks"."id" ASC LIMIT $1 [["LIMIT", 1]] + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 298486374], ["LIMIT", 1]] +  (0.6ms) SELECT COUNT(*) FROM "tasks" +Started PATCH "/tasks/298486374" for 127.0.0.1 at 2019-04-13 09:23:35 -0700 +Processing by TasksController#update as HTML + Parameters: {"id"=>"298486374"} + Task Load (1.7ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 298486374], ["LIMIT", 1]] +Completed 400 Bad Request in 3ms (ActiveRecord: 1.7ms) +  (0.4ms) ROLLBACK +  (1.6ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (1.2ms) ROLLBACK +  (4.5ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (2.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-13 16:23:35.365906"], ["updated_at", "2019-04-13 16:23:35.365906"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190968" for 127.0.0.1 at 2019-04-13 09:23:35 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190968"} + Task Load (13.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190968], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (3.1ms) +Completed 200 OK in 22ms (Views: 5.2ms | ActiveRecord: 13.3ms) +  (23.5ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-13 09:23:35 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (1.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 1.3ms) +  (0.7ms) ROLLBACK +  (0.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) BEGIN +  (0.4ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.6ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at", "completed") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-13 16:25:55.504395', '2019-04-13 16:25:55.504395', DEFAULT), (298486374, 'MyString', 'MyString', NULL, '2019-04-13 16:25:55.504395', '2019-04-13 16:25:55.504395', DEFAULT) +  (0.4ms) COMMIT +  (0.1ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +------------------------------------------------------------------- +TasksController::complete: test_0001_will redirect to the main page +------------------------------------------------------------------- +  (0.3ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-13 16:25:55.536970"], ["updated_at", "2019-04-13 16:25:55.536970"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started POST "/tasks/980190963/complete" for 127.0.0.1 at 2019-04-13 09:25:55 -0700 +Processing by TasksController#complete as HTML + Parameters: {"id"=>"980190963"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] +  (0.3ms) SAVEPOINT active_record_1 + Task Update (0.4ms) UPDATE "tasks" SET "completed" = $1, "updated_at" = $2 WHERE "tasks"."id" = $3 [["completed", true], ["updated_at", "2019-04-13 16:25:55.561932"], ["id", 980190963]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 14ms (ActiveRecord: 1.3ms) +  (0.6ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------------------------------- +TasksController::complete: test_0002_can mark a task, Mark complete or unmark complete +-------------------------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-13 16:25:55.570701"], ["updated_at", "2019-04-13 16:25:55.570701"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started POST "/tasks/980190964/complete" for 127.0.0.1 at 2019-04-13 09:25:55 -0700 +Processing by TasksController#complete as HTML + Parameters: {"id"=>"980190964"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190964], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Task Update (0.3ms) UPDATE "tasks" SET "completed" = $1, "updated_at" = $2 WHERE "tasks"."id" = $3 [["completed", true], ["updated_at", "2019-04-13 16:25:55.575156"], ["id", 980190964]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 0.9ms) + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."completed" = $1 LIMIT $2 [["completed", true], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.6ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-13 09:25:55 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +Unpermitted parameter: :completed +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.6ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-13 16:25:55.586489"], ["updated_at", "2019-04-13 16:25:55.586489"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 0.9ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-13 16:25:55.594017"], ["updated_at", "2019-04-13 16:25:55.594017"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190966" for 127.0.0.1 at 2019-04-13 09:25:55 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190966"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190966], ["LIMIT", 1]] +  (0.2ms) SAVEPOINT active_record_1 + Task Destroy (0.3ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190966]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 4ms (ActiveRecord: 1.0ms) +  (0.4ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."description" = $1 LIMIT $2 [["description", "Read one book per week"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-13 09:25:55 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.9ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.9ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.4ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-13 16:25:55.614533"], ["updated_at", "2019-04-13 16:25:55.614533"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190967/edit" for 127.0.0.1 at 2019-04-13 09:25:55 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190967"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (15.4ms) + Rendered tasks/edit.html.erb within layouts/application (18.9ms) +Completed 200 OK in 195ms (Views: 192.3ms | ActiveRecord: 0.3ms) +  (0.4ms) ROLLBACK +  (0.2ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-13 09:25:55 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (1.7ms) + Rendered tasks/new.html.erb within layouts/application (2.5ms) +Completed 200 OK in 7ms (Views: 4.5ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-13 16:25:55.830174"], ["updated_at", "2019-04-13 16:25:55.830174"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190968" for 127.0.0.1 at 2019-04-13 09:25:55 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190968"} + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190968], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (1.1ms) +Completed 200 OK in 7ms (Views: 3.6ms | ActiveRecord: 0.5ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-13 09:25:55 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.5ms) ROLLBACK +  (0.2ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +Started PATCH "/tasks/55" for 127.0.0.1 at 2019-04-13 09:25:55 -0700 +Processing by TasksController#update as HTML + Parameters: {"id"=>"55"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 55], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.2ms) +  (0.4ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.3ms) SAVEPOINT active_record_1 + Task Create (1.0ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "making a new one"], ["created_at", "2019-04-13 16:25:55.861851"], ["updated_at", "2019-04-13 16:25:55.861851"]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Started PATCH "/tasks/980190969" for 127.0.0.1 at 2019-04-13 09:25:55 -0700 +Processing by TasksController#update as HTML + Parameters: {"task"=>{"name"=>"not new"}, "id"=>"980190969"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190969], ["LIMIT", 1]] +  (0.3ms) SAVEPOINT active_record_1 + Task Update (0.4ms) UPDATE "tasks" SET "name" = $1, "updated_at" = $2 WHERE "tasks"."id" = $3 [["name", "not new"], ["updated_at", "2019-04-13 16:25:55.870888"], ["id", 980190969]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks/980190969 +Completed 302 Found in 4ms (ActiveRecord: 1.2ms) + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190969], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +---------------------------------------------------------------------------- +TasksController::update: test_0003_will not update if the params are invelid +---------------------------------------------------------------------------- + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" ORDER BY "tasks"."id" ASC LIMIT $1 [["LIMIT", 1]] + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 298486374], ["LIMIT", 1]] +  (0.5ms) SELECT COUNT(*) FROM "tasks" +Started PATCH "/tasks/298486374" for 127.0.0.1 at 2019-04-13 09:25:55 -0700 +Processing by TasksController#update as HTML + Parameters: {"id"=>"298486374"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 298486374], ["LIMIT", 1]] +Completed 400 Bad Request in 2ms (ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-13 09:25:55 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (3.0ms) +Completed 200 OK in 7ms (Views: 4.8ms | ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-13 09:25:55 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (2.1ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (3.5ms) +Completed 200 OK in 6ms (Views: 2.9ms | ActiveRecord: 2.1ms) +  (0.2ms) ROLLBACK +  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) BEGIN +  (0.4ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.6ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at", "completed") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-13 16:27:26.941083', '2019-04-13 16:27:26.941083', DEFAULT), (298486374, 'MyString', 'MyString', NULL, '2019-04-13 16:27:26.941083', '2019-04-13 16:27:26.941083', DEFAULT) +  (2.2ms) COMMIT +  (0.1ms) BEGIN +  (1.7ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.3ms) COMMIT +  (0.2ms) BEGIN +------------------------------------------------------------------- +TasksController::complete: test_0001_will redirect to the main page +------------------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-13 16:27:26.992052"], ["updated_at", "2019-04-13 16:27:26.992052"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started POST "/tasks/980190963/complete" for 127.0.0.1 at 2019-04-13 09:27:27 -0700 +Processing by TasksController#complete as HTML + Parameters: {"id"=>"980190963"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] +  (0.3ms) SAVEPOINT active_record_1 + Task Update (0.5ms) UPDATE "tasks" SET "completed" = $1, "updated_at" = $2 WHERE "tasks"."id" = $3 [["completed", true], ["updated_at", "2019-04-13 16:27:27.035952"], ["id", 980190963]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 13ms (ActiveRecord: 1.4ms) +  (0.4ms) ROLLBACK +  (0.3ms) BEGIN +-------------------------------------------------------------------------------------- +TasksController::complete: test_0002_can mark a task, Mark complete or unmark complete +-------------------------------------------------------------------------------------- +  (0.3ms) SAVEPOINT active_record_1 + Task Create (0.5ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-13 16:27:27.047820"], ["updated_at", "2019-04-13 16:27:27.047820"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started POST "/tasks/980190964/complete" for 127.0.0.1 at 2019-04-13 09:27:27 -0700 +Processing by TasksController#complete as HTML + Parameters: {"id"=>"980190964"} + Task Load (0.6ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190964], ["LIMIT", 1]] +  (0.2ms) SAVEPOINT active_record_1 + Task Update (0.3ms) UPDATE "tasks" SET "completed" = $1, "updated_at" = $2 WHERE "tasks"."id" = $3 [["completed", true], ["updated_at", "2019-04-13 16:27:27.053973"], ["id", 980190964]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 4ms (ActiveRecord: 1.3ms) + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."completed" = $1 LIMIT $2 [["completed", true], ["LIMIT", 1]] + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."completed" = $1 LIMIT $2 [["completed", false], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.4ms) BEGIN +---------------------------------------------------------------------------- +TasksController::update: test_0003_will not update if the params are invelid +---------------------------------------------------------------------------- + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" ORDER BY "tasks"."id" ASC LIMIT $1 [["LIMIT", 1]] + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 298486374], ["LIMIT", 1]] +  (0.4ms) SELECT COUNT(*) FROM "tasks" +Started PATCH "/tasks/298486374" for 127.0.0.1 at 2019-04-13 09:27:27 -0700 +Processing by TasksController#update as HTML + Parameters: {"id"=>"298486374"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 298486374], ["LIMIT", 1]] +Completed 400 Bad Request in 1ms (ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "making a new one"], ["created_at", "2019-04-13 16:27:27.072637"], ["updated_at", "2019-04-13 16:27:27.072637"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started PATCH "/tasks/980190965" for 127.0.0.1 at 2019-04-13 09:27:27 -0700 +Processing by TasksController#update as HTML + Parameters: {"task"=>{"name"=>"not new"}, "id"=>"980190965"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Task Update (0.5ms) UPDATE "tasks" SET "name" = $1, "updated_at" = $2 WHERE "tasks"."id" = $3 [["name", "not new"], ["updated_at", "2019-04-13 16:27:27.077025"], ["id", 980190965]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks/980190965 +Completed 302 Found in 4ms (ActiveRecord: 1.2ms) + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +Started PATCH "/tasks/55" for 127.0.0.1 at 2019-04-13 09:27:27 -0700 +Processing by TasksController#update as HTML + Parameters: {"id"=>"55"} + Task Load (1.5ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 55], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 1.5ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-13 16:27:27.093353"], ["updated_at", "2019-04-13 16:27:27.093353"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190966" for 127.0.0.1 at 2019-04-13 09:27:27 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190966"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190966], ["LIMIT", 1]] +  (0.2ms) SAVEPOINT active_record_1 + Task Destroy (0.3ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190966]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 0.9ms) +  (0.4ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."description" = $1 LIMIT $2 [["description", "Read one book per week"], ["LIMIT", 1]] +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-13 16:27:27.108997"], ["updated_at", "2019-04-13 16:27:27.108997"]] +  (1.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190967" for 127.0.0.1 at 2019-04-13 09:27:27 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190967"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (2.3ms) +Completed 200 OK in 189ms (Views: 185.6ms | ActiveRecord: 0.2ms) +  (0.5ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-13 09:27:27 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.3ms) +  (0.4ms) ROLLBACK +  (0.3ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.5ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-13 16:27:27.318407"], ["updated_at", "2019-04-13 16:27:27.318407"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190968/edit" for 127.0.0.1 at 2019-04-13 09:27:27 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190968"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190968], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (14.1ms) + Rendered tasks/edit.html.erb within layouts/application (16.3ms) +Completed 200 OK in 22ms (Views: 18.2ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-13 09:27:27 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.4ms) +  (0.3ms) ROLLBACK +  (0.3ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-13 09:27:27 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (3.0ms) +Completed 200 OK in 6ms (Views: 4.2ms | ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-13 09:27:27 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.2ms) +Completed 200 OK in 5ms (Views: 4.1ms | ActiveRecord: 0.4ms) +  (0.4ms) ROLLBACK +  (0.3ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.4ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-13 09:27:27 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +Unpermitted parameter: :completed +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-13 16:27:27.382927"], ["updated_at", "2019-04-13 16:27:27.382927"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 0.7ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (1.2ms) ROLLBACK +  (0.2ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-13 09:27:27 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (1.5ms) + Rendered tasks/new.html.erb within layouts/application (2.2ms) +Completed 200 OK in 5ms (Views: 3.8ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) BEGIN +  (0.4ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.6ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at", "completed") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-13 16:27:59.666647', '2019-04-13 16:27:59.666647', DEFAULT), (298486374, 'MyString', 'MyString', NULL, '2019-04-13 16:27:59.666647', '2019-04-13 16:27:59.666647', DEFAULT) +  (0.4ms) COMMIT +  (0.1ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-13 09:27:59 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (5.5ms) +Completed 200 OK in 166ms (Views: 157.8ms | ActiveRecord: 0.4ms) +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-13 09:27:59 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.1ms) +Completed 200 OK in 5ms (Views: 3.7ms | ActiveRecord: 0.5ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.5ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-13 09:27:59 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +Unpermitted parameter: :completed +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.6ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-13 16:27:59.898918"], ["updated_at", "2019-04-13 16:27:59.898918"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 5ms (ActiveRecord: 1.0ms) +  (0.4ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------------------------------- +TasksController::complete: test_0002_can mark a task, Mark complete or unmark complete +-------------------------------------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.5ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-13 16:27:59.909176"], ["updated_at", "2019-04-13 16:27:59.909176"]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Started POST "/tasks/980190964/complete" for 127.0.0.1 at 2019-04-13 09:27:59 -0700 +Processing by TasksController#complete as HTML + Parameters: {"id"=>"980190964"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190964], ["LIMIT", 1]] +  (1.8ms) SAVEPOINT active_record_1 + Task Update (0.4ms) UPDATE "tasks" SET "completed" = $1, "updated_at" = $2 WHERE "tasks"."id" = $3 [["completed", true], ["updated_at", "2019-04-13 16:27:59.919784"], ["id", 980190964]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 7ms (ActiveRecord: 2.8ms) + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."completed" = $1 LIMIT $2 [["completed", true], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------- +TasksController::complete: test_0001_will redirect to the main page +------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-13 16:27:59.926283"], ["updated_at", "2019-04-13 16:27:59.926283"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started POST "/tasks/980190965/complete" for 127.0.0.1 at 2019-04-13 09:27:59 -0700 +Processing by TasksController#complete as HTML + Parameters: {"id"=>"980190965"} + Task Load (0.6ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] +  (0.4ms) SAVEPOINT active_record_1 + Task Update (0.7ms) UPDATE "tasks" SET "completed" = $1, "updated_at" = $2 WHERE "tasks"."id" = $3 [["completed", true], ["updated_at", "2019-04-13 16:27:59.933239"], ["id", 980190965]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 6ms (ActiveRecord: 2.0ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-13 09:27:59 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (14.9ms) + Rendered tasks/new.html.erb within layouts/application (17.1ms) +Completed 200 OK in 20ms (Views: 18.5ms | ActiveRecord: 0.0ms) +  (0.4ms) ROLLBACK +  (0.7ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +Started PATCH "/tasks/55" for 127.0.0.1 at 2019-04-13 09:27:59 -0700 +Processing by TasksController#update as HTML + Parameters: {"id"=>"55"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 55], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------- +TasksController::update: test_0003_will not update if the params are invelid +---------------------------------------------------------------------------- + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" ORDER BY "tasks"."id" ASC LIMIT $1 [["LIMIT", 1]] + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 298486374], ["LIMIT", 1]] +  (0.2ms) SELECT COUNT(*) FROM "tasks" +Started PATCH "/tasks/298486374" for 127.0.0.1 at 2019-04-13 09:27:59 -0700 +Processing by TasksController#update as HTML + Parameters: {"id"=>"298486374"} + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 298486374], ["LIMIT", 1]] +Completed 400 Bad Request in 3ms (ActiveRecord: 0.5ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.9ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "making a new one"], ["created_at", "2019-04-13 16:27:59.987709"], ["updated_at", "2019-04-13 16:27:59.987709"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started PATCH "/tasks/980190966" for 127.0.0.1 at 2019-04-13 09:27:59 -0700 +Processing by TasksController#update as HTML + Parameters: {"task"=>{"name"=>"not new"}, "id"=>"980190966"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190966], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Task Update (0.3ms) UPDATE "tasks" SET "name" = $1, "updated_at" = $2 WHERE "tasks"."id" = $3 [["name", "not new"], ["updated_at", "2019-04-13 16:27:59.993832"], ["id", 980190966]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks/980190966 +Completed 302 Found in 3ms (ActiveRecord: 0.9ms) + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190966], ["LIMIT", 1]] +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.5ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-13 16:28:00.004611"], ["updated_at", "2019-04-13 16:28:00.004611"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190967" for 127.0.0.1 at 2019-04-13 09:28:00 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190967"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (1.1ms) +Completed 200 OK in 6ms (Views: 3.3ms | ActiveRecord: 0.2ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-13 09:28:00 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.3ms) SAVEPOINT active_record_1 + Task Create (1.5ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-13 16:28:00.027522"], ["updated_at", "2019-04-13 16:28:00.027522"]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190968/edit" for 127.0.0.1 at 2019-04-13 09:28:00 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190968"} + Task Load (0.8ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190968], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (1.7ms) + Rendered tasks/edit.html.erb within layouts/application (2.5ms) +Completed 200 OK in 8ms (Views: 4.0ms | ActiveRecord: 0.8ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-13 09:28:00 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.3ms) +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (8.0ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-13 16:28:00.052992"], ["updated_at", "2019-04-13 16:28:00.052992"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190969" for 127.0.0.1 at 2019-04-13 09:28:00 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190969"} + Task Load (4.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190969], ["LIMIT", 1]] +  (1.8ms) SAVEPOINT active_record_1 + Task Destroy (0.3ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190969]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 9ms (ActiveRecord: 6.6ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."description" = $1 LIMIT $2 [["description", "Read one book per week"], ["LIMIT", 1]] +  (0.1ms) ROLLBACK diff --git a/test/controllers/tasks_controller_test.rb b/test/controllers/tasks_controller_test.rb index 1f3712256..416181103 100644 --- a/test/controllers/tasks_controller_test.rb +++ b/test/controllers/tasks_controller_test.rb @@ -177,7 +177,20 @@ end # Complete for Wave 4 - describe "toggle_complete" do + describe "complete" do + it "will redirect to the main page" do + post complete_task_path(id: task.id) + + must_respond_with :redirect + must_redirect_to tasks_path + end + it "can mark a task, Mark complete or unmark complete" do + post complete_task_path(id: task.id) + completed_task = Task.find_by(completed: true) + expect(completed_task.completed).must_equal true + + end + # Your tests go here end end From 400d1c14440e7f3deb55b666826cd48e0c89975a Mon Sep 17 00:00:00 2001 From: Bitaman Date: Sun, 14 Apr 2019 17:05:46 -0700 Subject: [PATCH 16/16] minor changes --- log/development.log | 343 +++++++++++++++++ log/test.log | 435 ++++++++++++++++++++++ test/controllers/tasks_controller_test.rb | 1 - 3 files changed, 778 insertions(+), 1 deletion(-) diff --git a/log/development.log b/log/development.log index d24f57b62..aa9d0f14e 100644 --- a/log/development.log +++ b/log/development.log @@ -3399,3 +3399,346 @@ Processing by TasksController#index as HTML Completed 200 OK in 34ms (Views: 31.1ms | ActiveRecord: 0.7ms) +Started POST "/tasks/3/complete" for ::1 at 2019-04-13 09:28:44 -0700 +Processing by TasksController#complete as HTML + Parameters: {"authenticity_token"=>"2josYfestG0HEBiXdo68o8ihzePN0xbErJvu4m3nD9mnnA036klUx4zrW0UlQwcDlFmtRXxWlLK15Oa/Mur12Q==", "id"=>"3"} + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 3], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:63 +  (0.2ms) BEGIN + ↳ app/controllers/tasks_controller.rb:69 + Task Update (0.4ms) UPDATE "tasks" SET "completed" = $1, "updated_at" = $2 WHERE "tasks"."id" = $3 [["completed", true], ["updated_at", "2019-04-13 16:28:44.688318"], ["id", 3]] + ↳ app/controllers/tasks_controller.rb:69 +  (0.9ms) COMMIT + ↳ app/controllers/tasks_controller.rb:69 +Redirected to http://localhost:3000/tasks +Completed 302 Found in 6ms (ActiveRecord: 2.2ms) + + +Started GET "/tasks" for ::1 at 2019-04-13 09:28:44 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (3.4ms) +Completed 200 OK in 29ms (Views: 27.2ms | ActiveRecord: 0.3ms) + + +Started GET "/" for ::1 at 2019-04-14 17:03:48 -0700 +  (2.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC + ↳ /Users/bitaamani/.rvm/gems/ruby-2.6.0/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:98 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.9ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (40.1ms) +Completed 200 OK in 349ms (Views: 331.4ms | ActiveRecord: 6.5ms) + + +Started GET "/tasks" for ::1 at 2019-04-14 17:03:52 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (1.4ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (6.4ms) +Completed 200 OK in 36ms (Views: 32.2ms | ActiveRecord: 1.4ms) + + +Started GET "/tasks" for ::1 at 2019-04-14 17:03:54 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (8.9ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (15.4ms) +Completed 200 OK in 51ms (Views: 40.4ms | ActiveRecord: 8.9ms) + + +Started GET "/tasks/new" for ::1 at 2019-04-14 17:03:55 -0700 +Processing by TasksController#new as HTML +Completed 400 Bad Request in 3ms (ActiveRecord: 0.0ms) + + + +ActionController::ParameterMissing - param is missing or the value is empty: task: + app/controllers/tasks_controller.rb:81:in `task_params' + app/controllers/tasks_controller.rb:21:in `new' + +Started POST "/__better_errors/59d980d8f9141289/variables" for ::1 at 2019-04-14 17:03:55 -0700 +Started GET "/tasks/new" for ::1 at 2019-04-14 17:04:20 -0700 +Processing by TasksController#new as HTML +  (0.4ms) BEGIN + ↳ app/controllers/tasks_controller.rb:22 + Task Create (1.5ms) INSERT INTO "tasks" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2019-04-15 00:04:20.360963"], ["updated_at", "2019-04-15 00:04:20.360963"]] + ↳ app/controllers/tasks_controller.rb:22 +  (1.1ms) COMMIT + ↳ app/controllers/tasks_controller.rb:22 +Redirected to http://localhost:3000/tasks +Completed 302 Found in 23ms (ActiveRecord: 6.8ms) + + +Started GET "/tasks" for ::1 at 2019-04-14 17:04:20 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.8ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (6.0ms) +Completed 200 OK in 47ms (Views: 45.3ms | ActiveRecord: 0.8ms) + + +Started GET "/tasks/new" for ::1 at 2019-04-14 17:04:22 -0700 +Processing by TasksController#new as HTML +  (15.2ms) BEGIN + ↳ app/controllers/tasks_controller.rb:22 + Task Create (0.8ms) INSERT INTO "tasks" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2019-04-15 00:04:22.499101"], ["updated_at", "2019-04-15 00:04:22.499101"]] + ↳ app/controllers/tasks_controller.rb:22 +  (0.8ms) COMMIT + ↳ app/controllers/tasks_controller.rb:22 +Redirected to http://localhost:3000/tasks +Completed 302 Found in 22ms (ActiveRecord: 16.8ms) + + +Started GET "/tasks" for ::1 at 2019-04-14 17:04:22 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (1.5ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (8.1ms) +Completed 200 OK in 32ms (Views: 28.7ms | ActiveRecord: 1.5ms) + + +Started GET "/tasks/new" for ::1 at 2019-04-14 17:04:24 -0700 +Processing by TasksController#new as HTML +  (15.5ms) BEGIN + ↳ app/controllers/tasks_controller.rb:22 + Task Create (0.6ms) INSERT INTO "tasks" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2019-04-15 00:04:24.543170"], ["updated_at", "2019-04-15 00:04:24.543170"]] + ↳ app/controllers/tasks_controller.rb:22 +  (1.0ms) COMMIT + ↳ app/controllers/tasks_controller.rb:22 +Redirected to http://localhost:3000/tasks +Completed 302 Found in 22ms (ActiveRecord: 17.0ms) + + +Started GET "/tasks" for ::1 at 2019-04-14 17:04:24 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.7ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (8.9ms) +Completed 200 OK in 36ms (Views: 33.1ms | ActiveRecord: 0.7ms) + + +Started GET "/tasks/new" for ::1 at 2019-04-14 17:04:25 -0700 +Processing by TasksController#new as HTML +  (18.3ms) BEGIN + ↳ app/controllers/tasks_controller.rb:22 + Task Create (0.5ms) INSERT INTO "tasks" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2019-04-15 00:04:25.338010"], ["updated_at", "2019-04-15 00:04:25.338010"]] + ↳ app/controllers/tasks_controller.rb:22 +  (0.9ms) COMMIT + ↳ app/controllers/tasks_controller.rb:22 +Redirected to http://localhost:3000/tasks +Completed 302 Found in 24ms (ActiveRecord: 19.7ms) + + +Started GET "/tasks" for ::1 at 2019-04-14 17:04:25 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (3.9ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (10.5ms) +Completed 200 OK in 45ms (Views: 38.3ms | ActiveRecord: 3.9ms) + + +Started GET "/tasks/new" for ::1 at 2019-04-14 17:04:26 -0700 +Processing by TasksController#new as HTML +  (16.6ms) BEGIN + ↳ app/controllers/tasks_controller.rb:22 + Task Create (1.5ms) INSERT INTO "tasks" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2019-04-15 00:04:27.017110"], ["updated_at", "2019-04-15 00:04:27.017110"]] + ↳ app/controllers/tasks_controller.rb:22 +  (3.6ms) COMMIT + ↳ app/controllers/tasks_controller.rb:22 +Redirected to http://localhost:3000/tasks +Completed 302 Found in 32ms (ActiveRecord: 21.7ms) + + +Started GET "/tasks" for ::1 at 2019-04-14 17:04:27 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.9ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (14.8ms) +Completed 200 OK in 51ms (Views: 47.2ms | ActiveRecord: 0.9ms) + + +Started DELETE "/tasks/14" for ::1 at 2019-04-14 17:04:35 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"authenticity_token"=>"+OCcJ0vOwqdyKD94Ry71cNoIjigamUc3tG6h6SN6BMuFRr1xVisiDfnTfKoU407QhvDujqscxUGtEam0fHf+yw==", "id"=>"14"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 14], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:58 +  (0.1ms) BEGIN + ↳ app/controllers/tasks_controller.rb:63 + Task Destroy (0.4ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 14]] + ↳ app/controllers/tasks_controller.rb:63 +  (0.6ms) COMMIT + ↳ app/controllers/tasks_controller.rb:63 +Redirected to http://localhost:3000/tasks +Completed 302 Found in 9ms (ActiveRecord: 1.7ms) + + +Started GET "/tasks" for ::1 at 2019-04-14 17:04:35 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (3.1ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (11.6ms) +Completed 200 OK in 48ms (Views: 42.6ms | ActiveRecord: 3.1ms) + + +Started GET "/tasks/new" for ::1 at 2019-04-14 17:04:49 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (16.1ms) + Rendered tasks/new.html.erb within layouts/application (17.4ms) +Completed 200 OK in 66ms (Views: 39.1ms | ActiveRecord: 3.8ms) + + +Started POST "/tasks" for ::1 at 2019-04-14 17:05:00 -0700 +Processing by TasksController#create as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"aw4abymuo7chnWmiADcQ+5OkviqupwGrypuVuSIHglZBxGrLAKSTaGMiLvHgiH/OsCc+0apzOpsvepwDJZgsvQ==", "task"=>{"name"=>"jhuds", "description"=>"djhc", "completion_date"=>"2018-02-03"}, "commit"=>"New"} +  (1.4ms) BEGIN + ↳ app/controllers/tasks_controller.rb:30 + Task Create (0.5ms) INSERT INTO "tasks" ("name", "description", "completion_date", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["name", "jhuds"], ["description", "djhc"], ["completion_date", "2018-02-03 00:00:00"], ["created_at", "2019-04-15 00:05:00.562784"], ["updated_at", "2019-04-15 00:05:00.562784"]] + ↳ app/controllers/tasks_controller.rb:30 +  (0.5ms) COMMIT + ↳ app/controllers/tasks_controller.rb:30 +Redirected to http://localhost:3000/tasks +Completed 302 Found in 8ms (ActiveRecord: 2.4ms) + + +Started GET "/tasks" for ::1 at 2019-04-14 17:05:00 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (8.5ms) +Completed 200 OK in 35ms (Views: 33.1ms | ActiveRecord: 0.4ms) + + +Started DELETE "/tasks/15" for ::1 at 2019-04-14 17:05:05 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"authenticity_token"=>"UMeq2OMBVJlCqzkVIHhx63Sxh9Xd+kOSGhrYUI8W3zgtYYuO/uS0M8lQesdztcpLKEnnc2x/weQDZdAN0BslOA==", "id"=>"15"} + Task Load (1.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 15], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:53 +  (0.4ms) BEGIN + ↳ app/controllers/tasks_controller.rb:58 + Task Destroy (0.5ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 15]] + ↳ app/controllers/tasks_controller.rb:58 +  (0.5ms) COMMIT + ↳ app/controllers/tasks_controller.rb:58 +Redirected to http://localhost:3000/tasks +Completed 302 Found in 34ms (ActiveRecord: 2.6ms) + + +Started GET "/tasks" for ::1 at 2019-04-14 17:05:05 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.8ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (6.9ms) +Completed 200 OK in 32ms (Views: 29.7ms | ActiveRecord: 0.8ms) + + +Started DELETE "/tasks/11" for ::1 at 2019-04-14 17:05:08 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"authenticity_token"=>"iGRmJPJnWzKksqVr/gTjcDMW3X01p1Uq+iJZgQhUJGr1wkdy74K7mC9J5rmtyVjQb+6924Qi11zjXVHcV1neag==", "id"=>"11"} + Task Load (0.8ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 11], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:53 +  (0.2ms) BEGIN + ↳ app/controllers/tasks_controller.rb:58 + Task Destroy (0.3ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 11]] + ↳ app/controllers/tasks_controller.rb:58 +  (0.4ms) COMMIT + ↳ app/controllers/tasks_controller.rb:58 +Redirected to http://localhost:3000/tasks +Completed 302 Found in 6ms (ActiveRecord: 1.8ms) + + +Started GET "/tasks" for ::1 at 2019-04-14 17:05:08 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.7ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (7.7ms) +Completed 200 OK in 33ms (Views: 31.5ms | ActiveRecord: 0.7ms) + + +Started DELETE "/tasks/12" for ::1 at 2019-04-14 17:05:10 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"authenticity_token"=>"uTm+NnmOPFRuKQ0wneLkrYE0CEpitJluSyEiAMqbdDDEn59gZGvc/uXSTuLOL18N3cxo7NMxGxhSXipdlZaOMA==", "id"=>"12"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 12], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:53 +  (0.1ms) BEGIN + ↳ app/controllers/tasks_controller.rb:58 + Task Destroy (0.7ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 12]] + ↳ app/controllers/tasks_controller.rb:58 +  (0.4ms) COMMIT + ↳ app/controllers/tasks_controller.rb:58 +Redirected to http://localhost:3000/tasks +Completed 302 Found in 5ms (ActiveRecord: 1.6ms) + + +Started GET "/tasks" for ::1 at 2019-04-14 17:05:10 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (4.2ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (11.9ms) +Completed 200 OK in 40ms (Views: 34.7ms | ActiveRecord: 4.2ms) + + +Started DELETE "/tasks/13" for ::1 at 2019-04-14 17:05:14 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"authenticity_token"=>"sBY3nh792G87mfbu6iL/o64G5QQAjQbVVTKy68BG1yzNsBbIAxg4xbBitTy570QD8v6ForEIhKNMTbq2n0stLA==", "id"=>"13"} + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 13], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:53 +  (0.4ms) BEGIN + ↳ app/controllers/tasks_controller.rb:58 + Task Destroy (0.3ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 13]] + ↳ app/controllers/tasks_controller.rb:58 +  (0.4ms) COMMIT + ↳ app/controllers/tasks_controller.rb:58 +Redirected to http://localhost:3000/tasks +Completed 302 Found in 6ms (ActiveRecord: 1.6ms) + + +Started GET "/tasks" for ::1 at 2019-04-14 17:05:14 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.6ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (9.4ms) +Completed 200 OK in 36ms (Views: 34.3ms | ActiveRecord: 0.6ms) + + +Started DELETE "/tasks/16" for ::1 at 2019-04-14 17:05:17 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"authenticity_token"=>"rL+qZERdiZT8kRvxa5ZZ3s+7roqtB6hpOn85Rye+PAbRGYsyWbhpPndqWCM4W+J+k0POLByCKh8jADEaeLPGBg==", "id"=>"16"} + Task Load (1.0ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 16], ["LIMIT", 1]] + ↳ app/controllers/tasks_controller.rb:53 +  (0.2ms) BEGIN + ↳ app/controllers/tasks_controller.rb:58 + Task Destroy (1.2ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 16]] + ↳ app/controllers/tasks_controller.rb:58 +  (2.5ms) COMMIT + ↳ app/controllers/tasks_controller.rb:58 +Redirected to http://localhost:3000/tasks +Completed 302 Found in 9ms (ActiveRecord: 4.8ms) + + +Started GET "/tasks" for ::1 at 2019-04-14 17:05:17 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (3.9ms) SELECT "tasks".* FROM "tasks" + ↳ app/views/tasks/index.html.erb:4 + Rendered tasks/index.html.erb within layouts/application (11.0ms) +Completed 200 OK in 33ms (Views: 27.7ms | ActiveRecord: 3.9ms) + + diff --git a/log/test.log b/log/test.log index 44cb93d86..9ee465e25 100644 --- a/log/test.log +++ b/log/test.log @@ -12011,3 +12011,438 @@ Completed 302 Found in 9ms (ActiveRecord: 6.6ms)  (0.3ms) SELECT COUNT(*) FROM "tasks" Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."description" = $1 LIMIT $2 [["description", "Read one book per week"], ["LIMIT", 1]]  (0.1ms) ROLLBACK +  (2.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.2ms) BEGIN +  (2.0ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.3ms) COMMIT +  (0.3ms) BEGIN + Fixtures Load (1.3ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at", "completed") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-14 04:08:59.939971', '2019-04-14 04:08:59.939971', DEFAULT), (298486374, 'MyString', 'MyString', NULL, '2019-04-14 04:08:59.939971', '2019-04-14 04:08:59.939971', DEFAULT) +  (1.4ms) COMMIT +  (0.2ms) BEGIN +  (0.2ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.3ms) SAVEPOINT active_record_1 + Task Create (0.6ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-14 04:08:59.982897"], ["updated_at", "2019-04-14 04:08:59.982897"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190963/edit" for 127.0.0.1 at 2019-04-13 21:08:59 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190963"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (25.3ms) + Rendered tasks/edit.html.erb within layouts/application (29.8ms) +Completed 200 OK in 227ms (Views: 212.4ms | ActiveRecord: 0.5ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-13 21:09:00 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.5ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-13 21:09:00 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.6ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (3.3ms) +Completed 200 OK in 7ms (Views: 4.2ms | ActiveRecord: 0.6ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-13 21:09:00 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.2ms) +Completed 200 OK in 3ms (Views: 2.4ms | ActiveRecord: 0.3ms) +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-13 21:09:00 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (1.2ms) + Rendered tasks/new.html.erb within layouts/application (1.9ms) +Completed 200 OK in 5ms (Views: 3.4ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-14 04:09:00.268849"], ["updated_at", "2019-04-14 04:09:00.268849"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190964" for 127.0.0.1 at 2019-04-13 21:09:00 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190964"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190964], ["LIMIT", 1]] +  (0.2ms) SAVEPOINT active_record_1 + Task Destroy (0.3ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190964]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 0.9ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."description" = $1 LIMIT $2 [["description", "Read one book per week"], ["LIMIT", 1]] +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-13 21:09:00 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.3ms) +  (0.5ms) ROLLBACK +  (0.2ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-14 04:09:00.291973"], ["updated_at", "2019-04-14 04:09:00.291973"]] +  (0.8ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190965" for 127.0.0.1 at 2019-04-13 21:09:00 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190965"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.9ms) +Completed 200 OK in 5ms (Views: 2.7ms | ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-13 21:09:00 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +Unpermitted parameter: :completed +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-14 04:09:00.308573"], ["updated_at", "2019-04-14 04:09:00.308573"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 0.6ms) +  (0.4ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.7ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +Started PATCH "/tasks/55" for 127.0.0.1 at 2019-04-13 21:09:00 -0700 +Processing by TasksController#update as HTML + Parameters: {"id"=>"55"} + Task Load (0.6ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 55], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 2ms (ActiveRecord: 0.6ms) +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.7ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "making a new one"], ["created_at", "2019-04-14 04:09:00.324380"], ["updated_at", "2019-04-14 04:09:00.324380"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started PATCH "/tasks/980190967" for 127.0.0.1 at 2019-04-13 21:09:00 -0700 +Processing by TasksController#update as HTML + Parameters: {"task"=>{"name"=>"not new"}, "id"=>"980190967"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] +  (0.2ms) SAVEPOINT active_record_1 + Task Update (0.4ms) UPDATE "tasks" SET "name" = $1, "updated_at" = $2 WHERE "tasks"."id" = $3 [["name", "not new"], ["updated_at", "2019-04-14 04:09:00.330939"], ["id", 980190967]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks/980190967 +Completed 302 Found in 5ms (ActiveRecord: 1.3ms) + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +---------------------------------------------------------------------------- +TasksController::update: test_0003_will not update if the params are invelid +---------------------------------------------------------------------------- + Task Load (1.1ms) SELECT "tasks".* FROM "tasks" ORDER BY "tasks"."id" ASC LIMIT $1 [["LIMIT", 1]] + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 298486374], ["LIMIT", 1]] +  (0.5ms) SELECT COUNT(*) FROM "tasks" +Started PATCH "/tasks/298486374" for 127.0.0.1 at 2019-04-13 21:09:00 -0700 +Processing by TasksController#update as HTML + Parameters: {"id"=>"298486374"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 298486374], ["LIMIT", 1]] +Completed 400 Bad Request in 1ms (ActiveRecord: 0.2ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------- +TasksController::complete: test_0001_will redirect to the main page +------------------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-14 04:09:00.350293"], ["updated_at", "2019-04-14 04:09:00.350293"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started POST "/tasks/980190968/complete" for 127.0.0.1 at 2019-04-13 21:09:00 -0700 +Processing by TasksController#complete as HTML + Parameters: {"id"=>"980190968"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190968], ["LIMIT", 1]] +  (0.2ms) SAVEPOINT active_record_1 + Task Update (0.5ms) UPDATE "tasks" SET "completed" = $1, "updated_at" = $2 WHERE "tasks"."id" = $3 [["completed", true], ["updated_at", "2019-04-14 04:09:00.355243"], ["id", 980190968]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 1.0ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------------------------------------- +TasksController::complete: test_0002_can mark a task, Mark complete or unmark complete +-------------------------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-14 04:09:00.359472"], ["updated_at", "2019-04-14 04:09:00.359472"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started POST "/tasks/980190969/complete" for 127.0.0.1 at 2019-04-13 21:09:00 -0700 +Processing by TasksController#complete as HTML + Parameters: {"id"=>"980190969"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190969], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Task Update (0.3ms) UPDATE "tasks" SET "completed" = $1, "updated_at" = $2 WHERE "tasks"."id" = $3 [["completed", true], ["updated_at", "2019-04-14 04:09:00.363567"], ["id", 980190969]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 0.8ms) + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."completed" = $1 LIMIT $2 [["completed", true], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.1ms) BEGIN +  (0.4ms) ALTER TABLE "tasks" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" DISABLE TRIGGER ALL +  (0.2ms) COMMIT +  (0.1ms) BEGIN + Fixtures Load (0.6ms) DELETE FROM "tasks"; +INSERT INTO "tasks" ("id", "name", "description", "completion_date", "created_at", "updated_at", "completed") VALUES (980190962, 'MyString', 'MyString', NULL, '2019-04-14 04:09:49.546225', '2019-04-14 04:09:49.546225', DEFAULT), (298486374, 'MyString', 'MyString', NULL, '2019-04-14 04:09:49.546225', '2019-04-14 04:09:49.546225', DEFAULT) +  (0.8ms) COMMIT +  (0.1ms) BEGIN +  (0.1ms) ALTER TABLE "tasks" ENABLE TRIGGER ALL;ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "ar_internal_metadata" ENABLE TRIGGER ALL +  (0.1ms) COMMIT +  (0.1ms) BEGIN +-------------------------------------------------------------- +TasksController::update: test_0001_can update an existing task +-------------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "making a new one"], ["created_at", "2019-04-14 04:09:49.586212"], ["updated_at", "2019-04-14 04:09:49.586212"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started PATCH "/tasks/980190963" for 127.0.0.1 at 2019-04-13 21:09:49 -0700 +Processing by TasksController#update as HTML + Parameters: {"task"=>{"name"=>"not new"}, "id"=>"980190963"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] +  (0.1ms) SAVEPOINT active_record_1 + Task Update (0.4ms) UPDATE "tasks" SET "name" = $1, "updated_at" = $2 WHERE "tasks"."id" = $3 [["name", "not new"], ["updated_at", "2019-04-14 04:09:49.602619"], ["id", 980190963]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks/980190963 +Completed 302 Found in 9ms (ActiveRecord: 1.0ms) + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190963], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------------------- +TasksController::update: test_0002_will redirect to the root page if given an invalid id +---------------------------------------------------------------------------------------- +Started PATCH "/tasks/55" for 127.0.0.1 at 2019-04-13 21:09:49 -0700 +Processing by TasksController#update as HTML + Parameters: {"id"=>"55"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 55], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.3ms) +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------------------------------------- +TasksController::update: test_0003_will not update if the params are invelid +---------------------------------------------------------------------------- + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" ORDER BY "tasks"."id" ASC LIMIT $1 [["LIMIT", 1]] + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 298486374], ["LIMIT", 1]] +  (0.3ms) SELECT COUNT(*) FROM "tasks" +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.2ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-14 04:09:49.614923"], ["updated_at", "2019-04-14 04:09:49.614923"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started PATCH "/tasks/980190964" for 127.0.0.1 at 2019-04-13 21:09:49 -0700 +Processing by TasksController#update as HTML + Parameters: {"id"=>"980190964"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190964], ["LIMIT", 1]] +Completed 400 Bad Request in 2ms (ActiveRecord: 0.4ms) +  (0.5ms) ROLLBACK +  (0.2ms) BEGIN +----------------------------- +Task: test_0001_must be valid +----------------------------- +  (0.6ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------- +TasksController::complete: test_0001_will redirect to the main page +------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.2ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-14 04:09:49.626354"], ["updated_at", "2019-04-14 04:09:49.626354"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started POST "/tasks/980190965/complete" for 127.0.0.1 at 2019-04-13 21:09:49 -0700 +Processing by TasksController#complete as HTML + Parameters: {"id"=>"980190965"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190965], ["LIMIT", 1]] +  (0.2ms) SAVEPOINT active_record_1 + Task Update (0.3ms) UPDATE "tasks" SET "completed" = $1, "updated_at" = $2 WHERE "tasks"."id" = $3 [["completed", true], ["updated_at", "2019-04-14 04:09:49.631203"], ["id", 980190965]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 0.9ms) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------------------------------------- +TasksController::complete: test_0002_can mark a task, Mark complete or unmark complete +-------------------------------------------------------------------------------------- +  (0.3ms) SAVEPOINT active_record_1 + Task Create (0.9ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-14 04:09:49.636060"], ["updated_at", "2019-04-14 04:09:49.636060"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started POST "/tasks/980190966/complete" for 127.0.0.1 at 2019-04-13 21:09:49 -0700 +Processing by TasksController#complete as HTML + Parameters: {"id"=>"980190966"} + Task Load (0.6ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190966], ["LIMIT", 1]] +  (0.2ms) SAVEPOINT active_record_1 + Task Update (0.3ms) UPDATE "tasks" SET "completed" = $1, "updated_at" = $2 WHERE "tasks"."id" = $3 [["completed", true], ["updated_at", "2019-04-14 04:09:49.642342"], ["id", 980190966]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 4ms (ActiveRecord: 1.2ms) + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."completed" = $1 LIMIT $2 [["completed", true], ["LIMIT", 1]] +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------- +TasksController::destroy: test_0001_can destroy a model +------------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "Read one book per week"], ["created_at", "2019-04-14 04:09:49.648030"], ["updated_at", "2019-04-14 04:09:49.648030"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SELECT COUNT(*) FROM "tasks" +Started DELETE "/tasks/980190967" for 127.0.0.1 at 2019-04-13 21:09:49 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"id"=>"980190967"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190967], ["LIMIT", 1]] +  (0.3ms) SAVEPOINT active_record_1 + Task Destroy (0.9ms) DELETE FROM "tasks" WHERE "tasks"."id" = $1 [["id", 980190967]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 5ms (ActiveRecord: 1.7ms) +  (0.4ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."description" = $1 LIMIT $2 [["description", "Read one book per week"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------- +TasksController::edit: test_0001_can get the edit page for an existing task +--------------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "read"], ["description", "read somethong"], ["created_at", "2019-04-14 04:09:49.664583"], ["updated_at", "2019-04-14 04:09:49.664583"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190968/edit" for 127.0.0.1 at 2019-04-13 21:09:49 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"980190968"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190968], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (6.2ms) + Rendered tasks/edit.html.erb within layouts/application (7.6ms) +Completed 200 OK in 238ms (Views: 236.7ms | ActiveRecord: 0.2ms) +  (0.6ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------------------------------------------------------------------------ +TasksController::edit: test_0002_will respond with redirect when attempting to edit a nonexistant task +------------------------------------------------------------------------------------------------------ +Started GET "/tasks/300/edit" for 127.0.0.1 at 2019-04-13 21:09:49 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"300"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 300], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.3ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +TasksController::new: test_0001_can get the new task page +--------------------------------------------------------- +Started GET "/tasks/new" for 127.0.0.1 at 2019-04-13 21:09:49 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (1.3ms) + Rendered tasks/new.html.erb within layouts/application (1.9ms) +Completed 200 OK in 5ms (Views: 3.3ms | ActiveRecord: 0.0ms) +  (0.2ms) ROLLBACK +  (0.4ms) BEGIN +------------------------------------------------------- +TasksController::index: test_0002_can get the root path +------------------------------------------------------- +Started GET "/" for 127.0.0.1 at 2019-04-13 21:09:49 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.8ms) +Completed 200 OK in 6ms (Views: 4.0ms | ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +TasksController::index: test_0001_can get the index path +-------------------------------------------------------- +Started GET "/tasks" for 127.0.0.1 at 2019-04-13 21:09:49 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.2ms) +Completed 200 OK in 3ms (Views: 2.0ms | ActiveRecord: 0.3ms) +  (0.1ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------- +TasksController::create: test_0001_can create a new task +-------------------------------------------------------- +  (0.3ms) SELECT COUNT(*) FROM "tasks" +Started POST "/tasks" for 127.0.0.1 at 2019-04-13 21:09:49 -0700 +Processing by TasksController#create as HTML + Parameters: {"task"=>{"name"=>"new task", "description"=>"new task description", "completed"=>"false"}} +Unpermitted parameter: :completed +  (0.4ms) SAVEPOINT active_record_1 + Task Create (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "new task"], ["description", "new task description"], ["created_at", "2019-04-14 04:09:49.944559"], ["updated_at", "2019-04-14 04:09:49.944559"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://www.example.com/tasks +Completed 302 Found in 3ms (ActiveRecord: 0.9ms) +  (0.3ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = $1 LIMIT $2 [["name", "new task"], ["LIMIT", 1]] +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +----------------------------------------------------- +TasksController::show: test_0001_can get a valid task +----------------------------------------------------- +  (0.2ms) SAVEPOINT active_record_1 + Task Create (1.8ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "sample task"], ["description", "this is an example for a test"], ["created_at", "2019-04-14 04:09:49.953175"], ["updated_at", "2019-04-14 04:09:49.953175"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Started GET "/tasks/980190970" for 127.0.0.1 at 2019-04-13 21:09:49 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"980190970"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", 980190970], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (1.1ms) +Completed 200 OK in 5ms (Views: 2.7ms | ActiveRecord: 0.4ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------------------ +TasksController::show: test_0002_will redirect for an invalid task +------------------------------------------------------------------ +Started GET "/tasks/-1" for 127.0.0.1 at 2019-04-13 21:09:49 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"-1"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = $1 LIMIT $2 [["id", -1], ["LIMIT", 1]] +Redirected to http://www.example.com/tasks +Completed 302 Found in 1ms (ActiveRecord: 0.2ms) +  (0.2ms) ROLLBACK diff --git a/test/controllers/tasks_controller_test.rb b/test/controllers/tasks_controller_test.rb index 416181103..f0ce857c2 100644 --- a/test/controllers/tasks_controller_test.rb +++ b/test/controllers/tasks_controller_test.rb @@ -188,7 +188,6 @@ post complete_task_path(id: task.id) completed_task = Task.find_by(completed: true) expect(completed_task.completed).must_equal true - end # Your tests go here