diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-06-27 02:39:55 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-06-27 02:39:55 +0200 |
| commit | b4f850e97aeb12369399d8e1ab354f66d3b88e40 (patch) | |
| tree | a4936218a3e8df5525150d12ed4b94c077befd6f /test | |
| parent | e7d5d0b2c32b172ecdaa80555bf5804043fd87a0 (diff) | |
Stage 6 click-testing fixes and production setup
- file_attachment.rb: delete old upload directory before writing replacement
files; fixes orphaned variants when filename or mime type changes
- assets/edit.html.erb: add file upload field and current file display;
the form was previously empty and non-functional
- admin.css: fix button_to hover styling; buttons now show orange hover
to signal interactivity
- test/controllers/users_controller_test.rb: assert input[type=submit]
not anchor tag for destroy action (button_to change)
- test/test_helper.rb: add I18n.locale reset in setup block
- doc/rc.d_cccms: fix cccms_chdir, add start_precmd for log/pid dirs,
PATH export for bash wrapper, user/pid/tcp_nopush unicorn fixes
- doc/INSTALL.md: new installation guide covering all non-obvious steps
- Remove parked search migration from doc/ (now in db/migrate/)
Diffstat (limited to 'test')
| -rw-r--r-- | test/controllers/users_controller_test.rb | 6 | ||||
| -rw-r--r-- | test/test_helper.rb | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/test/controllers/users_controller_test.rb b/test/controllers/users_controller_test.rb index 3ace95c..d37b428 100644 --- a/test/controllers/users_controller_test.rb +++ b/test/controllers/users_controller_test.rb | |||
| @@ -8,13 +8,13 @@ class UsersControllerTest < ActionController::TestCase | |||
| 8 | assert_response :success | 8 | assert_response :success |
| 9 | assert_select "a", { :count => 0, :text => "Destroy" } | 9 | assert_select "a", { :count => 0, :text => "Destroy" } |
| 10 | end | 10 | end |
| 11 | 11 | ||
| 12 | test "get index as admin user renders admin partial" do | 12 | test "get index as admin user renders admin partial" do |
| 13 | login_as :aaron | 13 | login_as :aaron |
| 14 | get :index | 14 | get :index |
| 15 | assert_response :success | 15 | assert_response :success |
| 16 | assert_select "a", "destroy" | 16 | assert_select "input[type=submit][value=destroy]" |
| 17 | assert_select "a", "show", "Show Link is missing" | 17 | assert_select "a", "show" |
| 18 | end | 18 | end |
| 19 | 19 | ||
| 20 | test "get new when logged in as admin" do | 20 | test "get new when logged in as admin" do |
diff --git a/test/test_helper.rb b/test/test_helper.rb index e7b15da..d438bb5 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb | |||
| @@ -47,6 +47,10 @@ class ActiveSupport::TestCase | |||
| 47 | 47 | ||
| 48 | # Add more helper methods to be used by all tests here... | 48 | # Add more helper methods to be used by all tests here... |
| 49 | 49 | ||
| 50 | setup do | ||
| 51 | I18n.locale = I18n.default_locale | ||
| 52 | end | ||
| 53 | |||
| 50 | def create_node_with_published_page | 54 | def create_node_with_published_page |
| 51 | node = create_node_with_draft | 55 | node = create_node_with_draft |
| 52 | draft = node.draft | 56 | draft = node.draft |
