summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/controllers/targets_controller_test.rb33
-rw-r--r--test/fixtures/target_allocations.yml11
-rw-r--r--test/fixtures/targets.yml7
-rw-r--r--test/models/target_allocation_test.rb7
-rw-r--r--test/models/target_test.rb7
5 files changed, 65 insertions, 0 deletions
diff --git a/test/controllers/targets_controller_test.rb b/test/controllers/targets_controller_test.rb
new file mode 100644
index 0000000..911e3ae
--- /dev/null
+++ b/test/controllers/targets_controller_test.rb
@@ -0,0 +1,33 @@
+require "test_helper"
+
+class TargetsControllerTest < ActionDispatch::IntegrationTest
+ test "should get index" do
+ get targets_index_url
+ assert_response :success
+ end
+
+ test "should get new" do
+ get targets_new_url
+ assert_response :success
+ end
+
+ test "should get create" do
+ get targets_create_url
+ assert_response :success
+ end
+
+ test "should get edit" do
+ get targets_edit_url
+ assert_response :success
+ end
+
+ test "should get update" do
+ get targets_update_url
+ assert_response :success
+ end
+
+ test "should get show" do
+ get targets_show_url
+ assert_response :success
+ end
+end
diff --git a/test/fixtures/target_allocations.yml b/test/fixtures/target_allocations.yml
new file mode 100644
index 0000000..0ba49ee
--- /dev/null
+++ b/test/fixtures/target_allocations.yml
@@ -0,0 +1,11 @@
+# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
+
+one:
+ target: one
+ nutrient_profile: one
+ percentage: 9.99
+
+two:
+ target: two
+ nutrient_profile: two
+ percentage: 9.99
diff --git a/test/fixtures/targets.yml b/test/fixtures/targets.yml
new file mode 100644
index 0000000..7d41224
--- /dev/null
+++ b/test/fixtures/targets.yml
@@ -0,0 +1,7 @@
+# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
+
+one:
+ name: MyString
+
+two:
+ name: MyString
diff --git a/test/models/target_allocation_test.rb b/test/models/target_allocation_test.rb
new file mode 100644
index 0000000..a89cd89
--- /dev/null
+++ b/test/models/target_allocation_test.rb
@@ -0,0 +1,7 @@
+require "test_helper"
+
+class TargetAllocationTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/models/target_test.rb b/test/models/target_test.rb
new file mode 100644
index 0000000..1d9b332
--- /dev/null
+++ b/test/models/target_test.rb
@@ -0,0 +1,7 @@
+require "test_helper"
+
+class TargetTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
Copyright 2019--2025 Marius PETER