diff options
author | Marius Peter <marius.peter@tutanota.com> | 2024-11-11 16:55:14 +0100 |
---|---|---|
committer | Marius Peter <marius.peter@tutanota.com> | 2024-11-11 16:55:14 +0100 |
commit | fea9476a591559bd8fdcf17b64e5114c592a5b08 (patch) | |
tree | 08aa0fdd62752f1d286aa66ac77413fb03d6d737 /test |
C'est l'heure d'assurer le suivi de quelques flacons!main
Diffstat (limited to 'test')
-rw-r--r-- | test/application_system_test_case.rb | 5 | ||||
-rw-r--r-- | test/channels/application_cable/connection_test.rb | 13 | ||||
-rw-r--r-- | test/controllers/.keep | 0 | ||||
-rw-r--r-- | test/controllers/wines_controller_test.rb | 8 | ||||
-rw-r--r-- | test/fixtures/files/.keep | 0 | ||||
-rw-r--r-- | test/fixtures/wines.yml | 19 | ||||
-rw-r--r-- | test/helpers/.keep | 0 | ||||
-rw-r--r-- | test/integration/.keep | 0 | ||||
-rw-r--r-- | test/mailers/.keep | 0 | ||||
-rw-r--r-- | test/models/.keep | 0 | ||||
-rw-r--r-- | test/models/wine_test.rb | 7 | ||||
-rw-r--r-- | test/system/.keep | 0 | ||||
-rw-r--r-- | test/test_helper.rb | 15 |
13 files changed, 67 insertions, 0 deletions
diff --git a/test/application_system_test_case.rb b/test/application_system_test_case.rb new file mode 100644 index 0000000..cee29fd --- /dev/null +++ b/test/application_system_test_case.rb @@ -0,0 +1,5 @@ +require "test_helper" + +class ApplicationSystemTestCase < ActionDispatch::SystemTestCase + driven_by :selenium, using: :headless_chrome, screen_size: [ 1400, 1400 ] +end diff --git a/test/channels/application_cable/connection_test.rb b/test/channels/application_cable/connection_test.rb new file mode 100644 index 0000000..6340bf9 --- /dev/null +++ b/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/test/controllers/.keep b/test/controllers/.keep new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test/controllers/.keep diff --git a/test/controllers/wines_controller_test.rb b/test/controllers/wines_controller_test.rb new file mode 100644 index 0000000..09451be --- /dev/null +++ b/test/controllers/wines_controller_test.rb @@ -0,0 +1,8 @@ +require "test_helper" + +class WinesControllerTest < ActionDispatch::IntegrationTest + test "should get index" do + get wines_index_url + assert_response :success + end +end diff --git a/test/fixtures/files/.keep b/test/fixtures/files/.keep new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test/fixtures/files/.keep diff --git a/test/fixtures/wines.yml b/test/fixtures/wines.yml new file mode 100644 index 0000000..93bad81 --- /dev/null +++ b/test/fixtures/wines.yml @@ -0,0 +1,19 @@ +# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + name: MyString + year: 1 + variety: MyString + region: MyString + price: 9.99 + stock: 1 + notes: MyText + +two: + name: MyString + year: 1 + variety: MyString + region: MyString + price: 9.99 + stock: 1 + notes: MyText diff --git a/test/helpers/.keep b/test/helpers/.keep new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test/helpers/.keep diff --git a/test/integration/.keep b/test/integration/.keep new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test/integration/.keep diff --git a/test/mailers/.keep b/test/mailers/.keep new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test/mailers/.keep diff --git a/test/models/.keep b/test/models/.keep new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test/models/.keep diff --git a/test/models/wine_test.rb b/test/models/wine_test.rb new file mode 100644 index 0000000..fd6b688 --- /dev/null +++ b/test/models/wine_test.rb @@ -0,0 +1,7 @@ +require "test_helper" + +class WineTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/system/.keep b/test/system/.keep new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test/system/.keep diff --git a/test/test_helper.rb b/test/test_helper.rb new file mode 100644 index 0000000..0c22470 --- /dev/null +++ b/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 |