diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/controllers/quotes_controller_test.rb | 18 | ||||
-rw-r--r-- | test/fixtures/quotes.yml | 17 | ||||
-rw-r--r-- | test/models/quote_test.rb | 7 |
3 files changed, 42 insertions, 0 deletions
diff --git a/test/controllers/quotes_controller_test.rb b/test/controllers/quotes_controller_test.rb new file mode 100644 index 0000000..a085d40 --- /dev/null +++ b/test/controllers/quotes_controller_test.rb | |||
@@ -0,0 +1,18 @@ | |||
1 | require "test_helper" | ||
2 | |||
3 | class QuotesControllerTest < ActionDispatch::IntegrationTest | ||
4 | test "should get index" do | ||
5 | get quotes_index_url | ||
6 | assert_response :success | ||
7 | end | ||
8 | |||
9 | test "should get show" do | ||
10 | get quotes_show_url | ||
11 | assert_response :success | ||
12 | end | ||
13 | |||
14 | test "should get new" do | ||
15 | get quotes_new_url | ||
16 | assert_response :success | ||
17 | end | ||
18 | end | ||
diff --git a/test/fixtures/quotes.yml b/test/fixtures/quotes.yml new file mode 100644 index 0000000..761703f --- /dev/null +++ b/test/fixtures/quotes.yml | |||
@@ -0,0 +1,17 @@ | |||
1 | # Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html | ||
2 | |||
3 | one: | ||
4 | content: MyText | ||
5 | state: MyString | ||
6 | submitter: MyString | ||
7 | notes: MyText | ||
8 | upvotes: 1 | ||
9 | downvotes: 1 | ||
10 | |||
11 | two: | ||
12 | content: MyText | ||
13 | state: MyString | ||
14 | submitter: MyString | ||
15 | notes: MyText | ||
16 | upvotes: 1 | ||
17 | downvotes: 1 | ||
diff --git a/test/models/quote_test.rb b/test/models/quote_test.rb new file mode 100644 index 0000000..d58ff5c --- /dev/null +++ b/test/models/quote_test.rb | |||
@@ -0,0 +1,7 @@ | |||
1 | require "test_helper" | ||
2 | |||
3 | class QuoteTest < ActiveSupport::TestCase | ||
4 | # test "the truth" do | ||
5 | # assert true | ||
6 | # end | ||
7 | end | ||