Skip to content

Commit

Permalink
Fixture cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandermeindl committed Dec 10, 2024
1 parent 49ccc83 commit 7760af5
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 21 deletions.
4 changes: 0 additions & 4 deletions test/functional/my_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
require File.expand_path '../../test_helper', __FILE__

class MyControllerTest < RedmineSudo::ControllerTest
fixtures :users, :email_addresses, :user_preferences, :roles, :projects, :members, :member_roles,
:issues, :issue_statuses, :trackers, :enumerations, :custom_fields, :auth_sources, :queries, :enabled_modules,
:journals

def setup
User.current = nil
end
Expand Down
5 changes: 0 additions & 5 deletions test/functional/users_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
require File.expand_path '../../test_helper', __FILE__

class UsersControllerTest < RedmineSudo::ControllerTest
fixtures :users, :email_addresses, :groups_users, :roles, :user_preferences,
:enumerations,
:projects, :projects_trackers, :enabled_modules,
:members, :member_roles

def setup
User.current = nil
end
Expand Down
5 changes: 1 addition & 4 deletions test/integration/api_test/users_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@

module ApiTest
class UsersTest < Redmine::ApiTest::Base
fixtures :users, :email_addresses, :groups_users, :roles, :user_preferences,
:enumerations,
:projects, :projects_trackers, :enabled_modules,
:members, :member_roles
fixtures :all

test 'GET /users.xml should return users' do
get '/users.xml', headers: credentials('admin')
Expand Down
2 changes: 2 additions & 0 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ def prepare_tests; end

class ControllerTest < Redmine::ControllerTest
include RedmineSudo::TestHelper
fixtures :all
end

class TestCase < ActiveSupport::TestCase
include RedmineSudo::TestHelper
fixtures :all
end
end
8 changes: 0 additions & 8 deletions test/unit/user_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,6 @@
require File.expand_path '../../test_helper', __FILE__

class UserTest < RedmineSudo::TestCase
fixtures :users, :groups_users, :email_addresses, :user_preferences,
:members, :projects, :roles, :member_roles, :auth_sources,
:trackers, :issue_statuses, :projects_trackers,
:issue_categories, :enumerations, :issues, :watchers,
:journals, :journal_details,
:enabled_modules, :repositories,
:tokens

def setup
ActionMailer::Base.deliveries.clear
User.current = nil
Expand Down

0 comments on commit 7760af5

Please sign in to comment.