From 0579ff6e741b7b977840cc51c3c09b408119b069 Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Mon, 2 Sep 2024 18:05:03 +0300 Subject: [PATCH] Test changeset not found page --- test/system/changeset_test.rb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 test/system/changeset_test.rb diff --git a/test/system/changeset_test.rb b/test/system/changeset_test.rb new file mode 100644 index 000000000..3f50d37ac --- /dev/null +++ b/test/system/changeset_test.rb @@ -0,0 +1,19 @@ +require "application_system_test_case" + +class ChangesetSystemTest < ApplicationSystemTestCase + test "show existing changeset" do + changeset = create(:changeset) + + visit changeset_path(changeset) + within_sidebar do + assert_text "Changeset: #{changeset.id}" + end + end + + test "show error message for a changeset that doesn't exist" do + visit changeset_path(0) + within_sidebar do + assert_text "changeset #0 could not be found" + end + end +end -- 2.39.5