diff --git a/.circleci/config.yml b/.circleci/config.yml index 18ace287..5c4f4408 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,7 +11,7 @@ executors: - image: docker:20.10.23 orbs: - browser-tools: circleci/browser-tools@1.4.7 + browser-tools: circleci/browser-tools@1.5.0 coveralls: coveralls/coveralls@1.0.6 jobs: @@ -39,10 +39,8 @@ jobs: working_directory: ~/application_portfolio steps: - - - - browser-tools/install-browser-tools: - replace-existing-chrome: true + + - browser-tools/install-chrome - checkout diff --git a/Gemfile b/Gemfile index f3f0018d..9c31a001 100644 --- a/Gemfile +++ b/Gemfile @@ -6,15 +6,21 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" } ruby '3.3.3' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' -gem 'rails', '~> 6.1.7.10' +gem 'rails', '~> 7.2.2.1' # Use sqlite3 as the database for Active Record gem 'sqlite3', '~> 1.4' +# Add mutex since it won't be part of rails in future +gem 'mutex_m' + +# Deals with serialization deprecation in Rails 7.1 +gem 'globalize', '~> 7.0' + # Needed for ruby 3.3.3 upgrade gem 'net-pop', '~> 0.1.2' gem 'net-protocol', '>= 0' # Use nokogiri for java -gem 'nokogiri', '>= 1.16.5' +gem 'nokogiri', '>= 1.18.3' # Use Puma as the app server gem 'puma', '>= 6.4.3' # Use SCSS for stylesheets @@ -88,7 +94,7 @@ group :development, :test do # Use factory_bot_rails to generate random test data gem 'factory_bot_rails' gem 'rspec_junit_formatter' - gem 'rspec-rails', '~>4.1.0' + gem 'rspec-rails', '~> 6.0' gem 'shoulda-matchers', '~> 4.0' end @@ -98,11 +104,11 @@ group :development do gem 'capistrano-rails', '~> 1.4', require: false gem 'capistrano-rvm', require: false # Access an interactive console on exception pages or by calling 'console' anywhere in the code. - gem 'listen', '>= 3.0.5', '< 3.2' + gem 'listen', '~> 3.5' gem 'web-console', '>= 3.3.0' # 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' + # gem 'spring' + # gem 'spring-watcher-listen' end group :production do diff --git a/Gemfile.lock b/Gemfile.lock index fc5b60a8..29fbacd9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,65 +1,77 @@ GEM remote: https://rubygems.org/ specs: - actioncable (6.1.7.10) - actionpack (= 6.1.7.10) - activesupport (= 6.1.7.10) + actioncable (7.2.2.1) + actionpack (= 7.2.2.1) + activesupport (= 7.2.2.1) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.1.7.10) - actionpack (= 6.1.7.10) - activejob (= 6.1.7.10) - activerecord (= 6.1.7.10) - activestorage (= 6.1.7.10) - activesupport (= 6.1.7.10) - mail (>= 2.7.1) - actionmailer (6.1.7.10) - actionpack (= 6.1.7.10) - actionview (= 6.1.7.10) - activejob (= 6.1.7.10) - activesupport (= 6.1.7.10) - mail (~> 2.5, >= 2.5.4) - rails-dom-testing (~> 2.0) - actionpack (6.1.7.10) - actionview (= 6.1.7.10) - activesupport (= 6.1.7.10) - rack (~> 2.0, >= 2.0.9) + zeitwerk (~> 2.6) + actionmailbox (7.2.2.1) + actionpack (= 7.2.2.1) + activejob (= 7.2.2.1) + activerecord (= 7.2.2.1) + activestorage (= 7.2.2.1) + activesupport (= 7.2.2.1) + mail (>= 2.8.0) + actionmailer (7.2.2.1) + actionpack (= 7.2.2.1) + actionview (= 7.2.2.1) + activejob (= 7.2.2.1) + activesupport (= 7.2.2.1) + mail (>= 2.8.0) + rails-dom-testing (~> 2.2) + actionpack (7.2.2.1) + actionview (= 7.2.2.1) + activesupport (= 7.2.2.1) + nokogiri (>= 1.8.5) + racc + rack (>= 2.2.4, < 3.2) + rack-session (>= 1.0.1) rack-test (>= 0.6.3) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.1.7.10) - actionpack (= 6.1.7.10) - activerecord (= 6.1.7.10) - activestorage (= 6.1.7.10) - activesupport (= 6.1.7.10) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + useragent (~> 0.16) + actiontext (7.2.2.1) + actionpack (= 7.2.2.1) + activerecord (= 7.2.2.1) + activestorage (= 7.2.2.1) + activesupport (= 7.2.2.1) + globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (6.1.7.10) - activesupport (= 6.1.7.10) + actionview (7.2.2.1) + activesupport (= 7.2.2.1) builder (~> 3.1) - erubi (~> 1.4) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (6.1.7.10) - activesupport (= 6.1.7.10) + erubi (~> 1.11) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + activejob (7.2.2.1) + activesupport (= 7.2.2.1) globalid (>= 0.3.6) - activemodel (6.1.7.10) - activesupport (= 6.1.7.10) - activerecord (6.1.7.10) - activemodel (= 6.1.7.10) - activesupport (= 6.1.7.10) - activestorage (6.1.7.10) - actionpack (= 6.1.7.10) - activejob (= 6.1.7.10) - activerecord (= 6.1.7.10) - activesupport (= 6.1.7.10) + activemodel (7.2.2.1) + activesupport (= 7.2.2.1) + activerecord (7.2.2.1) + activemodel (= 7.2.2.1) + activesupport (= 7.2.2.1) + timeout (>= 0.4.0) + activestorage (7.2.2.1) + actionpack (= 7.2.2.1) + activejob (= 7.2.2.1) + activerecord (= 7.2.2.1) + activesupport (= 7.2.2.1) marcel (~> 1.0) - mini_mime (>= 1.1.0) - activesupport (6.1.7.10) - concurrent-ruby (~> 1.0, >= 1.0.2) + activesupport (7.2.2.1) + base64 + benchmark (>= 0.3) + bigdecimal + concurrent-ruby (~> 1.0, >= 1.3.1) + connection_pool (>= 2.2.5) + drb i18n (>= 1.6, < 2) + logger (>= 1.4.2) minitest (>= 5.1) - tzinfo (~> 2.0) - zeitwerk (~> 2.3) + securerandom (>= 0.3) + tzinfo (~> 2.0, >= 2.0.5) addressable (2.8.7) public_suffix (>= 2.0.2, < 7.0) airbrussh (1.5.3) @@ -69,7 +81,8 @@ GEM execjs (~> 2) base64 (0.2.0) bcrypt (3.1.20) - bigdecimal (3.1.8) + benchmark (0.4.0) + bigdecimal (3.1.9) bindex (0.8.1) bootsnap (1.18.4) msgpack (~> 1.2) @@ -78,7 +91,7 @@ GEM popper_js (>= 2.11.8, < 3) bootstrap-datepicker-rails (1.10.0.1) railties (>= 3.0) - brakeman (6.2.2) + brakeman (7.0.0) racc builder (3.3.0) bundler-audit (0.9.2) @@ -92,7 +105,7 @@ GEM sshkit (>= 1.9.0) capistrano-bundler (1.6.0) capistrano (~> 3.1) - capistrano-rails (1.6.3) + capistrano-rails (1.7.0) capistrano (~> 3.1) capistrano-bundler (>= 1.1, < 3) capistrano-rvm (0.1.2) @@ -115,43 +128,54 @@ GEM coffee-script-source execjs coffee-script-source (1.12.2) - concurrent-ruby (1.3.4) + concurrent-ruby (1.3.5) + connection_pool (2.5.0) crass (1.0.6) - csv (3.3.0) - date (3.4.0) + csv (3.3.2) + date (3.4.1) devise (4.9.4) bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 4.1.0) responders warden (~> 1.2.3) - diff-lcs (1.5.1) + diff-lcs (1.6.0) docile (1.4.1) - dotenv (3.1.4) - dotenv-rails (3.1.4) - dotenv (= 3.1.4) + dotenv (3.1.7) + dotenv-rails (3.1.7) + dotenv (= 3.1.7) railties (>= 6.1) drb (2.2.1) - erubi (1.13.0) + erubi (1.13.1) execjs (2.10.0) - factory_bot (6.5.0) - activesupport (>= 5.0.0) + factory_bot (6.5.1) + activesupport (>= 6.1.0) factory_bot_rails (6.4.4) factory_bot (~> 6.5) railties (>= 5.0.0) - ffi (1.17.0-aarch64-linux-gnu) - ffi (1.17.0-arm-linux-gnu) - ffi (1.17.0-arm64-darwin) - ffi (1.17.0-x86-linux-gnu) - ffi (1.17.0-x86_64-darwin) - ffi (1.17.0-x86_64-linux-gnu) + ffi (1.17.1-aarch64-linux-gnu) + ffi (1.17.1-arm-linux-gnu) + ffi (1.17.1-arm64-darwin) + ffi (1.17.1-x86-linux-gnu) + ffi (1.17.1-x86_64-darwin) + ffi (1.17.1-x86_64-linux-gnu) globalid (1.2.1) activesupport (>= 6.1) + globalize (7.0.0) + activemodel (>= 7.0, < 8.1) + activerecord (>= 7.0, < 8.1) + activesupport (>= 7.0, < 8.1) + request_store (~> 1.0) gritter (1.2.0) - groupdate (6.4.0) - activesupport (>= 6.1) - i18n (1.14.6) + groupdate (6.5.1) + activesupport (>= 7) + i18n (1.14.7) concurrent-ruby (~> 1.0) + io-console (0.8.0) + irb (1.15.1) + pp (>= 0.6.0) + rdoc (>= 4.0.0) + reline (>= 0.4.2) jbuilder (2.13.0) actionview (>= 5.0.0) activesupport (>= 5.0.0) @@ -159,12 +183,14 @@ GEM rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) - json (2.7.6) - language_server-protocol (3.17.0.3) - listen (3.0.8) - rb-fsevent (~> 0.9, >= 0.9.4) - rb-inotify (~> 0.9, >= 0.9.7) - loofah (2.23.1) + json (2.10.1) + language_server-protocol (3.17.0.4) + lint_roller (1.1.0) + listen (3.9.0) + rb-fsevent (~> 0.10, >= 0.10.3) + rb-inotify (~> 0.9, >= 0.9.10) + logger (1.6.6) + loofah (2.24.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) mail (2.8.1) @@ -174,69 +200,81 @@ GEM net-smtp marcel (1.0.4) matrix (0.4.2) - method_source (1.1.0) mini_mime (1.1.5) - minitest (5.25.1) - msgpack (1.7.3) + mini_portile2 (2.8.8) + minitest (5.25.4) + msgpack (1.8.0) + mutex_m (0.3.0) mysql2 (0.5.6) - net-imap (0.5.0) + net-imap (0.5.6) date net-protocol net-pop (0.1.2) net-protocol net-protocol (0.2.2) timeout - net-scp (4.0.0) + net-scp (4.1.0) net-ssh (>= 2.6.5, < 8.0.0) net-sftp (4.0.0) net-ssh (>= 5.0.0, < 8.0.0) - net-smtp (0.5.0) + net-smtp (0.5.1) net-protocol net-ssh (7.3.0) nio4r (2.7.4) - nokogiri (1.16.7-aarch64-linux) + nokogiri (1.18.3) + mini_portile2 (~> 2.8.2) racc (~> 1.4) - nokogiri (1.16.7-arm-linux) + nokogiri (1.18.3-aarch64-linux-gnu) racc (~> 1.4) - nokogiri (1.16.7-arm64-darwin) + nokogiri (1.18.3-arm-linux-gnu) racc (~> 1.4) - nokogiri (1.16.7-x86-linux) + nokogiri (1.18.3-arm64-darwin) racc (~> 1.4) - nokogiri (1.16.7-x86_64-darwin) + nokogiri (1.18.3-x86_64-darwin) racc (~> 1.4) - nokogiri (1.16.7-x86_64-linux) + nokogiri (1.18.3-x86_64-linux-gnu) racc (~> 1.4) orm_adapter (0.5.0) - ostruct (0.6.0) + ostruct (0.6.1) parallel (1.26.3) - parser (3.3.5.1) + parser (3.3.7.1) ast (~> 2.4.1) racc petergate (3.0.0) activerecord (> 4.0.0) popper_js (2.11.8) + pp (0.6.2) + prettyprint + prettyprint (0.2.0) + psych (5.2.3) + date + stringio public_suffix (6.0.1) - puma (6.4.3) + puma (6.6.0) nio4r (~> 2.0) racc (1.8.1) - rack (2.2.10) - rack-test (2.1.0) + rack (2.2.11) + rack-session (1.0.2) + rack (< 3) + rack-test (2.2.0) rack (>= 1.3) - rails (6.1.7.10) - actioncable (= 6.1.7.10) - actionmailbox (= 6.1.7.10) - actionmailer (= 6.1.7.10) - actionpack (= 6.1.7.10) - actiontext (= 6.1.7.10) - actionview (= 6.1.7.10) - activejob (= 6.1.7.10) - activemodel (= 6.1.7.10) - activerecord (= 6.1.7.10) - activestorage (= 6.1.7.10) - activesupport (= 6.1.7.10) + rackup (1.0.1) + rack (< 3) + webrick + rails (7.2.2.1) + actioncable (= 7.2.2.1) + actionmailbox (= 7.2.2.1) + actionmailer (= 7.2.2.1) + actionpack (= 7.2.2.1) + actiontext (= 7.2.2.1) + actionview (= 7.2.2.1) + activejob (= 7.2.2.1) + activemodel (= 7.2.2.1) + activerecord (= 7.2.2.1) + activestorage (= 7.2.2.1) + activesupport (= 7.2.2.1) bundler (>= 1.15.0) - railties (= 6.1.7.10) - sprockets-rails (>= 2.0.0) + railties (= 7.2.2.1) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) actionview (>= 5.0.1.rc1) @@ -245,28 +283,36 @@ GEM activesupport (>= 5.0.0) minitest nokogiri (>= 1.6) - rails-html-sanitizer (1.6.0) + rails-html-sanitizer (1.6.2) loofah (~> 2.21) - nokogiri (~> 1.14) - railties (6.1.7.10) - actionpack (= 6.1.7.10) - activesupport (= 6.1.7.10) - method_source + nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) + railties (7.2.2.1) + actionpack (= 7.2.2.1) + activesupport (= 7.2.2.1) + irb (~> 1.13) + rackup (>= 1.0.0) rake (>= 12.2) - thor (~> 1.0) + thor (~> 1.0, >= 1.2.2) + zeitwerk (~> 2.6) rainbow (3.1.1) rake (13.2.1) rb-fsevent (0.11.2) rb-inotify (0.11.1) ffi (~> 1.0) rb-readline (0.5.5) - recaptcha (5.17.0) - regexp_parser (2.9.2) + rdoc (6.12.0) + psych (>= 4.0.0) + recaptcha (5.19.0) + regexp_parser (2.10.0) + reline (0.6.0) + io-console (~> 0.5) + request_store (1.7.0) + rack (>= 1.4) responders (3.1.1) actionpack (>= 5.2) railties (>= 5.2) - rexml (3.3.9) - rspec-core (3.13.2) + rexml (3.4.1) + rspec-core (3.13.3) rspec-support (~> 3.13.0) rspec-expectations (3.13.3) diff-lcs (>= 1.2.0, < 2.0) @@ -274,38 +320,41 @@ GEM rspec-mocks (3.13.2) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-rails (4.1.2) - actionpack (>= 4.2) - activesupport (>= 4.2) - railties (>= 4.2) - rspec-core (~> 3.10) - rspec-expectations (~> 3.10) - rspec-mocks (~> 3.10) - rspec-support (~> 3.10) - rspec-support (3.13.1) + rspec-rails (6.1.5) + actionpack (>= 6.1) + activesupport (>= 6.1) + railties (>= 6.1) + rspec-core (~> 3.13) + rspec-expectations (~> 3.13) + rspec-mocks (~> 3.13) + rspec-support (~> 3.13) + rspec-support (3.13.2) rspec_junit_formatter (0.6.0) rspec-core (>= 2, < 4, != 2.12.0) - rubocop (1.68.0) + rubocop (1.73.1) json (~> 2.3) - language_server-protocol (>= 3.17.0) + language_server-protocol (~> 3.17.0.2) + lint_roller (~> 1.1.0) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 2.4, < 3.0) - rubocop-ast (>= 1.32.2, < 2.0) + regexp_parser (>= 2.9.3, < 3.0) + rubocop-ast (>= 1.38.0, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.34.0) + unicode-display_width (>= 2.4.0, < 4.0) + rubocop-ast (1.38.1) parser (>= 3.3.1.0) - rubocop-rails (2.27.0) + rubocop-rails (2.30.2) activesupport (>= 4.2.0) + lint_roller (~> 1.1) rack (>= 1.1) - rubocop (>= 1.52.0, < 2.0) - rubocop-ast (>= 1.31.1, < 2.0) - rubocop-rspec (3.2.0) - rubocop (~> 1.61) + rubocop (>= 1.72.1, < 2.0) + rubocop-ast (>= 1.38.0, < 2.0) + rubocop-rspec (3.5.0) + lint_roller (~> 1.1) + rubocop (~> 1.72, >= 1.72.1) ruby-progressbar (1.13.0) - rubyzip (2.3.2) + rubyzip (2.4.1) sass (3.7.4) sass-listen (~> 4.0.0) sass-listen (4.0.0) @@ -325,6 +374,7 @@ GEM sprockets (> 3.0) sprockets-rails tilt + securerandom (0.4.1) selenium-webdriver (4.18.1) base64 (~> 0.2) rexml (~> 3.2, >= 3.2.5) @@ -339,10 +389,6 @@ GEM simplecov-html (0.13.1) simplecov-lcov (0.8.0) simplecov_json_formatter (0.1.4) - spring (2.1.1) - spring-watcher-listen (2.0.1) - listen (>= 2.7, < 4.0) - spring (>= 1.2, < 3.0) sprockets (3.7.5) base64 concurrent-ruby (~> 1.0) @@ -357,15 +403,17 @@ GEM sqlite3 (1.7.3-x86-linux) sqlite3 (1.7.3-x86_64-darwin) sqlite3 (1.7.3-x86_64-linux) - sshkit (1.23.2) + sshkit (1.24.0) base64 + logger net-scp (>= 1.1.2) net-sftp (>= 2.1.2) net-ssh (>= 2.8.0) ostruct + stringio (3.1.5) thor (1.3.2) - tilt (2.4.0) - timeout (0.4.1) + tilt (2.6.0) + timeout (0.4.3) turbolinks (5.2.1) turbolinks-source (~> 5.2) turbolinks-source (5.2.0) @@ -373,7 +421,10 @@ GEM concurrent-ruby (~> 1.0) uglifier (4.2.1) execjs (>= 0.3.0, < 3) - unicode-display_width (2.6.0) + unicode-display_width (3.1.4) + unicode-emoji (~> 4.0, >= 4.0.4) + unicode-emoji (4.0.4) + useragent (0.16.11) warden (1.2.9) rack (>= 2.0.9) web-console (4.2.1) @@ -381,13 +432,15 @@ GEM activemodel (>= 6.0.0) bindex (>= 0.4.0) railties (>= 6.0.0) + webrick (1.9.1) websocket (1.2.11) - websocket-driver (0.7.6) + websocket-driver (0.7.7) + base64 websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.7.1) + zeitwerk (2.7.2) PLATFORMS aarch64-linux @@ -417,23 +470,25 @@ DEPENDENCIES dotenv-rails drb factory_bot_rails + globalize (~> 7.0) gritter groupdate jbuilder (~> 2.5) jquery-rails - listen (>= 3.0.5, < 3.2) + listen (~> 3.5) + mutex_m mysql2 net-pop (~> 0.1.2) net-protocol - nokogiri (>= 1.16.5) + nokogiri (>= 1.18.3) petergate puma (>= 6.4.3) - rails (~> 6.1.7.10) + rails (~> 7.2.2.1) rails-controller-testing rb-readline recaptcha rexml (>= 3.3.9) - rspec-rails (~> 4.1.0) + rspec-rails (~> 6.0) rspec_junit_formatter rubocop rubocop-rails @@ -444,8 +499,6 @@ DEPENDENCIES shoulda-matchers (~> 4.0) simplecov simplecov-lcov - spring - spring-watcher-listen (~> 2.0.0) sqlite3 (~> 1.4) turbolinks (~> 5) tzinfo-data diff --git a/app/controllers/software_records_controller.rb b/app/controllers/software_records_controller.rb index 5ad5ed75..34219524 100644 --- a/app/controllers/software_records_controller.rb +++ b/app/controllers/software_records_controller.rb @@ -120,7 +120,7 @@ def create elsif !user_signed_in? && !@software_record.save flash[:error] = 'All mandatory fields are required.' redirect_to request_new_path - elsif user_signed_in? && (current_user.role.to_s == 'owner' || current_user.role.to_s == 'viewer') + elsif user_signed_in? && %w[owner viewer].include?(current_user.role.to_s) flash[:error] = 'All mandatory fields are required.' redirect_to request_new_path else diff --git a/app/mailers/admin_mailer.rb b/app/mailers/admin_mailer.rb index 32c9bcb5..813a18ca 100644 --- a/app/mailers/admin_mailer.rb +++ b/app/mailers/admin_mailer.rb @@ -7,7 +7,7 @@ class AdminMailer < ApplicationMailer def new_software_request_mail(id, name) @id = id @name = name - @template = 'new_software_request_mail.html.erb' + @template = 'new_software_request_mail' @users = User.where(roles: 'root_admin') @users.each do |admin| mail(to: admin.email, subject: 'Software Requested for UCL Application Portfolio', diff --git a/app/mailers/new_user_signup_mailer.rb b/app/mailers/new_user_signup_mailer.rb index fd66f7fd..9c9f5ba6 100644 --- a/app/mailers/new_user_signup_mailer.rb +++ b/app/mailers/new_user_signup_mailer.rb @@ -8,7 +8,7 @@ def new_user_signup_mail(id, email, first_name, last_name) @id = id @email = email @name = "#{first_name} #{last_name}" - @template = 'new_user_signup_mail.html.erb' + @template = 'new_user_signup_mail' @users = User.where(roles: 'root_admin') @users.each do |admin| mail(to: admin.email, subject: 'New User registered in UCL Application Portfolio', diff --git a/app/models/software_record.rb b/app/models/software_record.rb index 6f92660d..b69b36e1 100644 --- a/app/models/software_record.rb +++ b/app/models/software_record.rb @@ -8,9 +8,9 @@ class SoftwareRecord < ApplicationRecord belongs_to :hosting_environment has_many :change_request, dependent: :destroy validates :title, :description, :status, :created_by, presence: true - serialize :tech_leads, Array - serialize :developers, Array - serialize :product_owners, Array - serialize :admin_users, Array - serialize :departments, Array + serialize :tech_leads, type: Array, coder: YAML + serialize :developers, type: Array, coder: YAML + serialize :product_owners, type: Array, coder: YAML + serialize :admin_users, type: Array, coder: YAML + serialize :departments, type: Array, coder: YAML end diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 5380e937..4d1e28bc 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -43,8 +43,8 @@ end RSpec.configure do |config| # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures - config.fixture_path = Rails.root.join('spec/fixtures').to_s - + # config.fixture_path = Rails.root.join('spec/fixtures').to_s + config.fixture_paths = ["#{::Rails.root}/spec/fixtures"] # If you're not using ActiveRecord, or you'd prefer not to run each of your # examples within a transaction, remove the following line or assign false # instead of true. diff --git a/spec/views/change_requests/new.html.erb_spec.rb b/spec/views/change_requests/new_html.erb_spec.rb similarity index 100% rename from spec/views/change_requests/new.html.erb_spec.rb rename to spec/views/change_requests/new_html.erb_spec.rb index 690174ba..113e7120 100644 --- a/spec/views/change_requests/new.html.erb_spec.rb +++ b/spec/views/change_requests/new_html.erb_spec.rb @@ -5,10 +5,10 @@ RSpec.describe 'change_requests/new.html.erb', type: :view do before(:each) do assign(:change_request, ChangeRequest.new) - render end it 'renders the new change request form' do + render assert_select 'form[action=?][method=?]', change_requests_path, 'post' do assert_select 'input[name=?]', 'change_request[change_title]' assert_select 'textarea[name=?]', 'change_request[change_description]'