Project

General

Profile

Patch #30276 ยป missing-fixtures-v3.patch

Yuichi HARADA, 2018-12-26 08:12

View differences:

test/functional/calendars_controller_test.rb
30 30
           :issue_relations,
31 31
           :issue_categories,
32 32
           :enumerations,
33
           :queries
33
           :queries,
34
           :users, :email_addresses
34 35

  
35 36
  def test_show
36 37
    with_settings :gravatar_enabled => '1' do
......
129 130
    get :show, :params => {
130 131
        :query_id => 6
131 132
      }
132
      
133

  
133 134
    assert_response :success
134 135
    assert_select 'h2', :text => 'Open issues grouped by tracker'
135 136
  end
test/functional/gantts_controller_test.rb
25 25
           :member_roles,
26 26
           :members,
27 27
           :enabled_modules,
28
           :versions
28
           :versions,
29
           :email_addresses
29 30

  
30 31
  def test_gantt_should_work
31 32
    i2 = Issue.find(2)
test/functional/news_controller_test.rb
20 20
class NewsControllerTest < Redmine::ControllerTest
21 21
  fixtures :projects, :users, :email_addresses, :roles, :members, :member_roles,
22 22
           :enabled_modules, :news, :comments,
23
           :attachments
23
           :attachments, :user_preferences
24 24

  
25 25
  def setup
26 26
    User.current = nil
......
116 116
          :news => {
117 117
            :title => 'NewsControllerTest',
118 118
            :description => 'This is the description',
119
            :summary => '' 
119
            :summary => ''
120 120
          }
121 121
        }
122 122
    end
......
139 139
            :project_id => 1,
140 140
            :news => {
141 141
              :title => 'Test',
142
              :description => 'This is the description' 
143
            },  
142
              :description => 'This is the description'
143
            },
144 144
            :attachments => {
145 145
              '1' => {
146
              'file' => uploaded_test_file('testfile.txt', 'text/plain')}    
146
              'file' => uploaded_test_file('testfile.txt', 'text/plain')}
147 147
            }
148 148
          }
149 149
      end
......
160 160
        :news => {
161 161
          :title => '',
162 162
          :description => 'This is the description',
163
          :summary => '' 
163
          :summary => ''
164 164
        }
165 165
      }
166 166
    assert_response :success
......
181 181
    put :update, :params => {
182 182
        :id => 1,
183 183
        :news => {
184
          :description => 'Description changed by test_post_edit' 
184
          :description => 'Description changed by test_post_edit'
185 185
        }
186 186
      }
187 187
    assert_redirected_to '/news/1'
......
197 197
        put :update, :params => {
198 198
            :id => 1,
199 199
            :news => {
200
              :description => 'This is the description' 
201
            },  
200
              :description => 'This is the description'
201
            },
202 202
            :attachments => {
203 203
              '1' => {
204
              'file' => uploaded_test_file('testfile.txt', 'text/plain')}    
204
              'file' => uploaded_test_file('testfile.txt', 'text/plain')}
205 205
            }
206 206
          }
207 207
      end
......
215 215
    put :update, :params => {
216 216
        :id => 1,
217 217
        :news => {
218
          :description => '' 
218
          :description => ''
219 219
        }
220 220
      }
221 221
    assert_response :success
test/functional/settings_controller_test.rb
19 19

  
20 20
class SettingsControllerTest < Redmine::ControllerTest
21 21
  fixtures :projects, :trackers, :issue_statuses, :issues,
22
           :users
22
           :users, :email_addresses
23 23

  
24 24
  def setup
25 25
    User.current = nil
test/functional/welcome_controller_test.rb
18 18
require File.expand_path('../../test_helper', __FILE__)
19 19

  
20 20
class WelcomeControllerTest < Redmine::ControllerTest
21
  fixtures :projects, :news, :users, :members
21
  fixtures :projects, :news, :users, :members, :roles, :member_roles, :enabled_modules
22 22

  
23 23
  def setup
24 24
    Setting.default_language = 'en'
test/unit/custom_field_test.rb
20 20
class CustomFieldTest < ActiveSupport::TestCase
21 21
  fixtures :custom_fields, :roles, :projects,
22 22
           :trackers, :issue_statuses,
23
           :issues
23
           :issues, :users
24 24

  
25 25
  def setup
26 26
    User.current = nil
test/unit/journal_observer_test.rb
20 20
class JournalObserverTest < ActiveSupport::TestCase
21 21
  fixtures :issues, :issue_statuses, :journals, :journal_details, :projects,
22 22
           :projects_trackers, :trackers, :enabled_modules, :enumerations,
23
           :users, :email_addresses, :roles
23
           :users, :email_addresses, :roles, :members, :member_roles
24 24

  
25 25
  def setup
26 26
    User.current = nil
test/unit/lib/redmine/field_format/version_field_format_test.rb
22 22
  fixtures :projects, :versions, :trackers,
23 23
           :roles, :users, :members, :member_roles,
24 24
           :issue_statuses, :issue_categories, :issue_relations, :workflows,
25
           :enumerations, :custom_fields, :custom_fields_trackers
25
           :enumerations, :custom_fields, :custom_fields_trackers, :enabled_modules
26 26

  
27 27
  def setup
28 28
    super
......
70 70

  
71 71
    assert_equal expected, field.possible_values_options(project).map(&:first)
72 72
  end
73
 
73

  
74 74
  def test_possible_values_options_should_return_system_shared_versions_without_project
75 75
    field = IssueCustomField.new(:field_format => 'version')
76 76
    version = Version.generate!(:project => Project.find(1), :status => 'open', :sharing => 'system')
test/unit/project_copy_test.rb
36 36
           :boards, :messages,
37 37
           :repositories,
38 38
           :news, :comments,
39
           :documents
39
           :documents, :attachments
40 40

  
41 41
  def setup
42 42
    User.current = nil
test/unit/repository_test.rb
33 33
           :members,
34 34
           :member_roles,
35 35
           :roles,
36
           :enumerations
36
           :enumerations,
37
           :user_preferences,
38
           :watchers
37 39

  
38 40
  include Redmine::I18n
39 41

  
......
263 265
    assert_equal User.find_by_login('dlopper'), journal.user
264 266
    assert_equal 'Applied in changeset r2.', journal.notes
265 267

  
266
    # 5 email notifications, 2 for #1, 3 for #2
268
    # 4 emails for 2 members and 2 issues(#1, #2)
269
    # 1 email for a watcher of issue #2
267 270
    assert_equal 5, ActionMailer::Base.deliveries.size
268 271
    ActionMailer::Base.deliveries.first(2).each do |mail|
269 272
      assert_not_nil mail
    (1-1/1)