Skip to content

Commit

Permalink
Umlagern des Tests in den Model-Test
Browse files Browse the repository at this point in the history
  • Loading branch information
ro3t committed Oct 19, 2023
1 parent 8144bcc commit 029bb24
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
7 changes: 0 additions & 7 deletions test/controllers/issues_rss_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,4 @@ class IssuesRssControllerTest < ActionDispatch::IntegrationTest
get "/issues_rss/#{user(:one).uuid}.xml"
assert_response :success
end

test 'index for user without uuid' do
assert_predicate user(:two)[:uuid], :blank?
get "/issues_rss/#{user(:two).uuid}.xml"
assert_response :success
assert_not user(:two).reload[:uuid].blank?
end
end
7 changes: 7 additions & 0 deletions test/models/user_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,11 @@ class UserTest < ActiveSupport::TestCase
user.ldap = 'CN=test,DC=klarschiff,DC=de'
assert_valid user
end

test 'generate and save uuid if blank' do
user = user(:two)
assert_nil user[:uuid]
assert_predicate user.uuid, :present?
assert_not user.reload[:uuid].blank?
end
end

0 comments on commit 029bb24

Please sign in to comment.