Skip to content

Commit

Permalink
#45: Tests etwas überarbeitet / konkretisiert
Browse files Browse the repository at this point in the history
  • Loading branch information
nbennke committed Dec 6, 2023
1 parent 884f1a8 commit b8d2d63
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions test/controllers/issues_rss_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,19 @@

class IssuesRssControllerTest < ActionDispatch::IntegrationTest
test 'index for user with uuid' do
assert_not user(:one)[:uuid].blank?
get "/issues_rss/#{user(:one).uuid}.xml"
uuid = user(:one)[:uuid]
assert_predicate uuid, :present?
get "/issues_rss/#{uuid}.xml"
assert_response :success
end

%w[dashboards delegations districts editorial_notifications feedbacks field_services groups issues mail_blacklists
places responsibilities
users].each do |controller|
%w[delegations issues].each do |controller|
test "not authorized for user with uuid at #{controller} controller" do
assert_not user(:one)[:uuid].blank?
get "/issues/#{user(:one).uuid}.xml"
uuid = user(:one)[:uuid]
assert_predicate uuid, :present?
get "/#{controller}/#{uuid}.xml"
assert_response :redirect
assert_redirected_to new_logins_url
end
end
end

0 comments on commit b8d2d63

Please sign in to comment.