Removed some document-related tests/fixtures

pull/327/head
Stefan Frank 11 years ago committed by Sebastian Schuster
parent 10a1173004
commit 7b4be7f7e8
  1. 22
      test/exemplars/document_category_exemplar.rb
  2. 21
      test/exemplars/document_exemplar.rb
  3. 4
      test/fixtures/enabled_modules.yml
  4. 15
      test/fixtures/enumerations.yml
  5. 7
      test/functional/user_mailer_test.rb

@ -1,22 +0,0 @@
#-- encoding: UTF-8
#-- copyright
# OpenProject is a project management system.
#
# Copyright (C) 2012-2013 the OpenProject Team
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License version 3.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class DocumentCategory < Enumeration
generator_for :name, :method => :next_name
generator_for :type => 'DocumentCategory'
def self.next_name
@last_name ||= 'DocumentCategory0'
@last_name.succ!
@last_name
end
end

@ -1,21 +0,0 @@
#-- encoding: UTF-8
#-- copyright
# OpenProject is a project management system.
#
# Copyright (C) 2012-2013 the OpenProject Team
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License version 3.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class Document < ActiveRecord::Base
generator_for :title, :method => :next_title
def self.next_title
@last_title ||= 'Document001'
@last_title.succ!
@last_title
end
end

@ -11,10 +11,6 @@ enabled_modules_003:
name: news
project_id: 1
id: 3
enabled_modules_004:
name: documents
project_id: 1
id: 4
enabled_modules_006:
name: wiki
project_id: 1

@ -1,19 +1,4 @@
---
enumerations_001:
name: Uncategorized
id: 1
type: DocumentCategory
active: true
enumerations_002:
name: User documentation
id: 2
type: DocumentCategory
active: true
enumerations_003:
name: Technical documentation
id: 3
type: DocumentCategory
active: true
enumerations_004:
name: Low
id: 4

@ -354,13 +354,6 @@ class UserMailerTest < ActionMailer::TestCase
assert UserMailer.issue_updated(user, journal).deliver
end
def test_document_added
user = FactoryGirl.create(:user)
document = FactoryGirl.create(:document)
# TODO move out this method, as it ties core to openproject-documents-plugin
assert DocumentsMailer.document_added(user, document).deliver
end
def test_news_added
user = FactoryGirl.create(:user)
news = FactoryGirl.create(:news)

Loading…
Cancel
Save