Skip to content

Commit

Permalink
practice_options_within_courseメソッドのテストを作成
Browse files Browse the repository at this point in the history
  • Loading branch information
djkazunoko committed Aug 27, 2023
1 parent c9cf0f2 commit ba4bbd1
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/helpers/reports_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# frozen_string_literal: true

require 'test_helper'

class ReportsHelperTest < ActionView::TestCase
include Sorcery::Controller::InstanceMethods
include Sorcery::TestHelpers::Rails::Controller

test 'practice_options_within_course' do
login_user(user = users(:kimura))
assert_equal 'OS X Mountain Lionをクリーンインストールする', practice_options_within_course.first[0]
assert_equal 'sslの基礎を理解する', practice_options_within_course.last[0]
assert_no_difference 'practice_options_within_course.count' do
CategoriesPractice.create!(category_id: categories(:category2).id, practice_id: practices(:practice2).id, position: 7)
end
end
end

0 comments on commit ba4bbd1

Please sign in to comment.