From 0125eadc38604abf816596ac98810ec85ce92029 Mon Sep 17 00:00:00 2001 From: Dinis Date: Thu, 20 Aug 2020 11:39:59 +0100 Subject: [PATCH] Fix tests for admins and users - email key was missing --- .idea/misc.xml | 2 +- .idea/workspace.xml | 85 ++++++++++++++++++++----------------- Dockerfile | 4 +- Gemfile | 3 +- config/environments/test.rb | 1 + ss-calculator.iml | 2 + test/fixtures/admins.yml | 8 ++-- test/fixtures/users.yml | 7 +-- 8 files changed, 63 insertions(+), 49 deletions(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index 05ae320..1e5b2f5 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,6 @@ - + diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 64b07a6..5624034 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,34 +1,15 @@ - - - - - - - + + + - - - - - - - - - - - - - - - - - - - + + + + - + + + + + + + + + @@ -113,6 +109,10 @@ + + + + @@ -125,7 +125,7 @@ 1597686467739 - + 1597695591871 @@ -141,7 +141,14 @@ - @@ -150,29 +157,31 @@ - - + - - + + - + - + - + @@ -185,10 +194,10 @@ - + - + diff --git a/Dockerfile b/Dockerfile index 0f80b5a..cfe4fc4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ruby:2.5 +FROM ruby:2.6 RUN apt-get update -qq && apt-get install -y nodejs postgresql-client RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list @@ -13,7 +13,7 @@ RUN yarn install --check-files # Add a script to be executed every time the container starts. COPY entrypoint.sh /usr/bin/ - RUN chmod +x /usr/bin/entrypoint.sh +RUN chmod +x /usr/bin/entrypoint.sh ENTRYPOINT ["entrypoint.sh"] EXPOSE 3000 diff --git a/Gemfile b/Gemfile index 8f648b2..27405f7 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,8 @@ source 'https://rubygems.org' git_source(:github) { |repo| "https://github.com/#{repo}.git" } -ruby '2.5.8' +# For now let's allow any ruby version +# ruby '2.6.6' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '~> 6.0.3', '>= 6.0.3.2' diff --git a/config/environments/test.rb b/config/environments/test.rb index 0cb2424..9bfe785 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -35,6 +35,7 @@ Rails.application.configure do config.active_storage.service = :test config.action_mailer.perform_caching = false + config.action_mailer.default_url_options = { host: 'localhost', port: 3000 } # Tell Action Mailer not to deliver emails to the real world. # The :test delivery method accumulates sent emails in the diff --git a/ss-calculator.iml b/ss-calculator.iml index cc08a72..2825ace 100644 --- a/ss-calculator.iml +++ b/ss-calculator.iml @@ -26,6 +26,8 @@ + + diff --git a/test/fixtures/admins.yml b/test/fixtures/admins.yml index 5181636..4c895f5 100644 --- a/test/fixtures/admins.yml +++ b/test/fixtures/admins.yml @@ -4,8 +4,8 @@ # model remove the '{}' from the fixture names and add the columns immediately # below each fixture, per the syntax in the comments below # -one: {} -# column: value +one: + email: test1@example.org # -two: {} -# column: value +two: + email: test2@example.org diff --git a/test/fixtures/users.yml b/test/fixtures/users.yml index 5181636..d238007 100644 --- a/test/fixtures/users.yml +++ b/test/fixtures/users.yml @@ -4,8 +4,9 @@ # model remove the '{}' from the fixture names and add the columns immediately # below each fixture, per the syntax in the comments below # -one: {} +one: + email: test1@example.org # column: value # -two: {} -# column: value +two: + email: test2@example.org