diff options
Diffstat (limited to 'rails-backend/test')
19 files changed, 133 insertions, 0 deletions
diff --git a/rails-backend/test/channels/application_cable/connection_test.rb b/rails-backend/test/channels/application_cable/connection_test.rb new file mode 100644 index 0000000..6340bf9 --- /dev/null +++ b/rails-backend/test/channels/application_cable/connection_test.rb @@ -0,0 +1,13 @@ +require "test_helper" + +module ApplicationCable + class ConnectionTest < ActionCable::Connection::TestCase + # test "connects with cookies" do + # cookies.signed[:user_id] = 42 + # + # connect + # + # assert_equal connection.user_id, "42" + # end + end +end diff --git a/rails-backend/test/controllers/.keep b/rails-backend/test/controllers/.keep new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/rails-backend/test/controllers/.keep diff --git a/rails-backend/test/controllers/api/v1/auth_controller_test.rb b/rails-backend/test/controllers/api/v1/auth_controller_test.rb new file mode 100644 index 0000000..3a6d312 --- /dev/null +++ b/rails-backend/test/controllers/api/v1/auth_controller_test.rb @@ -0,0 +1,7 @@ +require "test_helper" + +class Api::V1::AuthControllerTest < ActionDispatch::IntegrationTest + # test "the truth" do + # assert true + # end +end diff --git a/rails-backend/test/controllers/api/v1/games_controller_test.rb b/rails-backend/test/controllers/api/v1/games_controller_test.rb new file mode 100644 index 0000000..0052dbb --- /dev/null +++ b/rails-backend/test/controllers/api/v1/games_controller_test.rb @@ -0,0 +1,7 @@ +require "test_helper" + +class Api::V1::GamesControllerTest < ActionDispatch::IntegrationTest + # test "the truth" do + # assert true + # end +end diff --git a/rails-backend/test/controllers/api/v1/tags_controller_test.rb b/rails-backend/test/controllers/api/v1/tags_controller_test.rb new file mode 100644 index 0000000..642edc6 --- /dev/null +++ b/rails-backend/test/controllers/api/v1/tags_controller_test.rb @@ -0,0 +1,7 @@ +require "test_helper" + +class Api::V1::TagsControllerTest < ActionDispatch::IntegrationTest + # test "the truth" do + # assert true + # end +end diff --git a/rails-backend/test/controllers/api/v1/users_controller_test.rb b/rails-backend/test/controllers/api/v1/users_controller_test.rb new file mode 100644 index 0000000..bd2d43b --- /dev/null +++ b/rails-backend/test/controllers/api/v1/users_controller_test.rb @@ -0,0 +1,7 @@ +require "test_helper" + +class Api::V1::UsersControllerTest < ActionDispatch::IntegrationTest + # test "the truth" do + # assert true + # end +end diff --git a/rails-backend/test/controllers/platform_tags_controller_test.rb b/rails-backend/test/controllers/platform_tags_controller_test.rb new file mode 100644 index 0000000..eb6257d --- /dev/null +++ b/rails-backend/test/controllers/platform_tags_controller_test.rb @@ -0,0 +1,7 @@ +require "test_helper" + +class PlatformTagsControllerTest < ActionDispatch::IntegrationTest + # test "the truth" do + # assert true + # end +end diff --git a/rails-backend/test/controllers/tags_controller_test.rb b/rails-backend/test/controllers/tags_controller_test.rb new file mode 100644 index 0000000..bbf5c97 --- /dev/null +++ b/rails-backend/test/controllers/tags_controller_test.rb @@ -0,0 +1,18 @@ +require "test_helper" + +class TagsControllerTest < ActionDispatch::IntegrationTest + test "should get index" do + get tags_index_url + assert_response :success + end + + test "should get create" do + get tags_create_url + assert_response :success + end + + test "should get destroy" do + get tags_destroy_url + assert_response :success + end +end diff --git a/rails-backend/test/fixtures/files/.keep b/rails-backend/test/fixtures/files/.keep new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/rails-backend/test/fixtures/files/.keep diff --git a/rails-backend/test/fixtures/games.yml b/rails-backend/test/fixtures/games.yml new file mode 100644 index 0000000..348ba2f --- /dev/null +++ b/rails-backend/test/fixtures/games.yml @@ -0,0 +1,9 @@ +# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + title: MyString + titleSlug: MyString + +two: + title: MyString + titleSlug: MyString diff --git a/rails-backend/test/fixtures/tags.yml b/rails-backend/test/fixtures/tags.yml new file mode 100644 index 0000000..5b866c5 --- /dev/null +++ b/rails-backend/test/fixtures/tags.yml @@ -0,0 +1,9 @@ +# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + type: + name: MyString + +two: + type: + name: MyString diff --git a/rails-backend/test/fixtures/users.yml b/rails-backend/test/fixtures/users.yml new file mode 100644 index 0000000..e4d2e35 --- /dev/null +++ b/rails-backend/test/fixtures/users.yml @@ -0,0 +1,13 @@ +# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + user_name: MyString + identifier: MyString + access_token_digest: MyString + user_data: + +two: + user_name: MyString + identifier: MyString + access_token_digest: MyString + user_data: diff --git a/rails-backend/test/integration/.keep b/rails-backend/test/integration/.keep new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/rails-backend/test/integration/.keep diff --git a/rails-backend/test/mailers/.keep b/rails-backend/test/mailers/.keep new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/rails-backend/test/mailers/.keep diff --git a/rails-backend/test/models/.keep b/rails-backend/test/models/.keep new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/rails-backend/test/models/.keep diff --git a/rails-backend/test/models/game_test.rb b/rails-backend/test/models/game_test.rb new file mode 100644 index 0000000..6628fae --- /dev/null +++ b/rails-backend/test/models/game_test.rb @@ -0,0 +1,7 @@ +require "test_helper" + +class GameTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/rails-backend/test/models/tag_test.rb b/rails-backend/test/models/tag_test.rb new file mode 100644 index 0000000..1846cdb --- /dev/null +++ b/rails-backend/test/models/tag_test.rb @@ -0,0 +1,7 @@ +require "test_helper" + +class TagTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/rails-backend/test/models/user_test.rb b/rails-backend/test/models/user_test.rb new file mode 100644 index 0000000..5c07f49 --- /dev/null +++ b/rails-backend/test/models/user_test.rb @@ -0,0 +1,7 @@ +require "test_helper" + +class UserTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/rails-backend/test/test_helper.rb b/rails-backend/test/test_helper.rb new file mode 100644 index 0000000..0c22470 --- /dev/null +++ b/rails-backend/test/test_helper.rb @@ -0,0 +1,15 @@ +ENV["RAILS_ENV"] ||= "test" +require_relative "../config/environment" +require "rails/test_help" + +module ActiveSupport + class TestCase + # Run tests in parallel with specified workers + parallelize(workers: :number_of_processors) + + # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. + fixtures :all + + # Add more helper methods to be used by all tests here... + end +end |
