From c671cc2dc18fff67b9baef6557da1b9a9bf850e6 Mon Sep 17 00:00:00 2001 From: Jez Caudle Date: Tue, 23 May 2023 09:29:12 +0100 Subject: [PATCH] Emergency commit after a dirty shutdown. --- README.md | 2 +- .../.domains_controller_test.rb.kate-swp | Bin 0 -> 232 bytes test/controllers/domains_controller_test.rb | 8 +++++++- test/fixtures/users.yml | 14 ++++++++------ 4 files changed, 16 insertions(+), 8 deletions(-) create mode 100644 test/controllers/.domains_controller_test.rb.kate-swp diff --git a/README.md b/README.md index 36761c7..13b33ba 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Ruby on Rails front end for OpenSMTPD. -An ISC Licensed RoR app to manage your OpemSMTPD users. +An ISC Licensed RoR app to manage your OpenSMTPD users. ## OpenBSD Instructions. diff --git a/test/controllers/.domains_controller_test.rb.kate-swp b/test/controllers/.domains_controller_test.rb.kate-swp new file mode 100644 index 0000000000000000000000000000000000000000..934c1e841d6c23e115f10ba89b217626b02d0535 GIT binary patch literal 232 zcmZQzU=Z?7EJ;-eE>A2_aLdd|RWQ;sU|?Vn34Xp`CiwZ$J)7S&HEfPzmD|EG**Z8J zD8mcH=AJ-;4~Rj4O#uvCgJFVfKtbW+%=EnY%shqC;?$yI4XdR5Bu&@gAfOCLKM1gZ gl*2eo3JMTekfBUK%uFU1sFi^U<`58v1>`ta0961XjQ{`u literal 0 HcmV?d00001 diff --git a/test/controllers/domains_controller_test.rb b/test/controllers/domains_controller_test.rb index 216edf7..53e7bf1 100644 --- a/test/controllers/domains_controller_test.rb +++ b/test/controllers/domains_controller_test.rb @@ -1,11 +1,17 @@ require "test_helper" class DomainsControllerTest < ActionDispatch::IntegrationTest + include Devise::Test::IntegrationHelpers setup do @domain = domains(:one) end - test "should get index" do + test "not should get index because we are not logged in" do + get domains_url + assert_response :success + end + + test "should get index because we are logged in" do get domains_url assert_response :success end diff --git a/test/fixtures/users.yml b/test/fixtures/users.yml index 82f27e2..22312d9 100644 --- a/test/fixtures/users.yml +++ b/test/fixtures/users.yml @@ -3,9 +3,11 @@ # # This model initially had no columns defined. If you add columns to the # # 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 -# # -# two: {} -# # column: value +# +bob: + email: "bob@example.net" + encrypted_password: <= Devise::Encryptor.digest(User, 'password') + +alice: + email: "alice@example.org" + encrypted_password: <= Devise::Encryptor.digest(User, 'password')