]> git.openstreetmap.org Git - rails.git/commitdiff
Test changeset not found page
authorAnton Khorev <tony29@yandex.ru>
Mon, 2 Sep 2024 15:05:03 +0000 (18:05 +0300)
committerAnton Khorev <tony29@yandex.ru>
Mon, 2 Sep 2024 15:05:03 +0000 (18:05 +0300)
test/system/changeset_test.rb [new file with mode: 0644]

diff --git a/test/system/changeset_test.rb b/test/system/changeset_test.rb
new file mode 100644 (file)
index 0000000..3f50d37
--- /dev/null
@@ -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