Business intelligence made simple
Added more tests for uploads [skip ci]
Andrew Kane259c99633e9b
diff --git a/test/uploads_test.rb b/test/uploads_test.rbindex 50ab3ac6..ef32f5b4 100644--- a/test/uploads_test.rb+++ b/test/uploads_test.rb@@ -50,7 +50,23 @@ class UploadsTest < ActionDispatch::IntegrationTestassert_match "Table already exists", response.bodyend- def test_rename+ def test_show+ create_upload+ upload = Blazer::Upload.last++ get blazer.upload_path(upload)+ assert_redirected_to blazer.new_query_path(upload_id: upload.id)+ end++ def test_edit+ create_upload+ upload = Blazer::Upload.last++ get blazer.edit_upload_path(upload)+ assert_response :success+ end++ def test_update_renamecreate_uploadupload = Blazer::Upload.lastassert_redirected_to blazer.upload_path(upload)@@ -62,6 +78,18 @@ class UploadsTest < ActionDispatch::IntegrationTestassert_equal ["items"], tablesend+ def test_destroy+ create_upload+ upload = Blazer::Upload.last++ delete blazer.upload_path(upload)+ assert_redirected_to blazer.uploads_path++ assert_raises(ActiveRecord::RecordNotFound) do+ upload.reload+ end+ end+def test_bad_content_typecreate_upload(content_type: "text/plain")assert_response :unprocessable_entity