- ['active_no_prefs_profile', api_fixture('users')['active_no_prefs_profile'], true, false],
- ['admin', api_fixture('users')['admin'], true, true],
- ].each do |token, user, is_active, has_profile|
- test "visit public project as user #{token} when anonymous browsing is enabled" do
- Rails.configuration.anonymous_user_token = api_fixture('api_client_authorizations')['anonymous']['api_token']
-
- path = "/projects/#{api_fixture('groups')['anonymously_accessible_project']['uuid']}/?public_data=true"
-
- if !token
- visit path
- else
- visit page_with_token(token, path)
- end
- verify_homepage_anonymous_enabled user, is_active, has_profile
- end
- end
-
- [
- [nil, nil],
- ['active', api_fixture('users')['active']],