summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/fixtures/ptu_natures.yml11
-rw-r--r--test/models/ptu_nature_test.rb9
2 files changed, 20 insertions, 0 deletions
diff --git a/test/fixtures/ptu_natures.yml b/test/fixtures/ptu_natures.yml
new file mode 100644
index 0000000..f71def4
--- /dev/null
+++ b/test/fixtures/ptu_natures.yml
@@ -0,0 +1,11 @@
+# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
+
+one:
+ name: Cuddly
+ raises: hp
+ lowers: atk
+
+two:
+ name: Careful
+ raises: spdef
+ lowers: spatk
diff --git a/test/models/ptu_nature_test.rb b/test/models/ptu_nature_test.rb
new file mode 100644
index 0000000..a343a9a
--- /dev/null
+++ b/test/models/ptu_nature_test.rb
@@ -0,0 +1,9 @@
+require "test_helper"
+
+class PtuNatureTest < ActiveSupport::TestCase
+ test "can create" do
+ assert_difference("PtuNature.count", 1) do
+ PtuNature.create(name: "Inconceivable", raises: "atk", lowers: "def")
+ end
+ end
+end