修改资源文件测试用例
This commit is contained in:
parent
ff67e3dbfe
commit
c5a837c689
18
Gemfile
18
Gemfile
|
@ -25,6 +25,16 @@ group :development do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
group :test do
|
||||||
|
# shoulda的版本做了改动
|
||||||
|
#gem "shoulda", "~> 3.3.2"
|
||||||
|
gem "shoulda", "> 3.3.2"
|
||||||
|
gem "mocha", "~> 0.13.3"
|
||||||
|
gem 'capybara', '~> 2.0.0'
|
||||||
|
gem 'nokogiri', '< 1.6.0'
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
# Gems used only for assets and not required
|
# Gems used only for assets and not required
|
||||||
# in production environments by default.
|
# in production environments by default.
|
||||||
group :assets do
|
group :assets do
|
||||||
|
@ -42,14 +52,6 @@ group :ldap do
|
||||||
gem "net-ldap", "~> 0.3.1"
|
gem "net-ldap", "~> 0.3.1"
|
||||||
end
|
end
|
||||||
|
|
||||||
group :test do
|
|
||||||
# shoulda的版本做了改动
|
|
||||||
#gem "shoulda", "~> 3.3.2"
|
|
||||||
gem "shoulda", "> 3.3.2"
|
|
||||||
gem "mocha", "~> 0.13.3"
|
|
||||||
gem 'capybara', '~> 2.0.0'
|
|
||||||
gem 'nokogiri', '< 1.6.0'
|
|
||||||
end
|
|
||||||
|
|
||||||
platforms :mri, :mingw do
|
platforms :mri, :mingw do
|
||||||
group :rmagick do
|
group :rmagick do
|
||||||
|
|
11
Gemfile.lock
11
Gemfile.lock
|
@ -68,10 +68,9 @@ GEM
|
||||||
coffee-script (2.2.0)
|
coffee-script (2.2.0)
|
||||||
coffee-script-source
|
coffee-script-source
|
||||||
execjs
|
execjs
|
||||||
coffee-script-source (1.6.1)
|
coffee-script-source (1.7.0)
|
||||||
erubis (2.7.0)
|
erubis (2.7.0)
|
||||||
execjs (1.4.0)
|
execjs (2.0.2)
|
||||||
multi_json (~> 1.0)
|
|
||||||
fastercsv (1.5.0)
|
fastercsv (1.5.0)
|
||||||
ffi (1.9.3-x86-mingw32)
|
ffi (1.9.3-x86-mingw32)
|
||||||
hike (1.2.3)
|
hike (1.2.3)
|
||||||
|
@ -124,7 +123,7 @@ GEM
|
||||||
rmagick (2.13.2)
|
rmagick (2.13.2)
|
||||||
ruby-openid (2.1.8)
|
ruby-openid (2.1.8)
|
||||||
rubyzip (1.1.4)
|
rubyzip (1.1.4)
|
||||||
sass (3.2.7)
|
sass (3.2.14)
|
||||||
sass-rails (3.2.6)
|
sass-rails (3.2.6)
|
||||||
railties (~> 3.2.0)
|
railties (~> 3.2.0)
|
||||||
sass (>= 3.1.10)
|
sass (>= 3.1.10)
|
||||||
|
@ -151,9 +150,9 @@ GEM
|
||||||
polyglot
|
polyglot
|
||||||
polyglot (>= 0.3.1)
|
polyglot (>= 0.3.1)
|
||||||
tzinfo (0.3.37)
|
tzinfo (0.3.37)
|
||||||
uglifier (1.0.3)
|
uglifier (2.4.0)
|
||||||
execjs (>= 0.3.0)
|
execjs (>= 0.3.0)
|
||||||
multi_json (>= 1.0.2)
|
json (>= 1.8.0)
|
||||||
websocket (1.0.7)
|
websocket (1.0.7)
|
||||||
xpath (1.0.0)
|
xpath (1.0.0)
|
||||||
nokogiri (~> 1.3)
|
nokogiri (~> 1.3)
|
||||||
|
|
60
db/schema.rb
60
db/schema.rb
|
@ -174,58 +174,6 @@ ActiveRecord::Schema.define(:version => 20140618020535) do
|
||||||
|
|
||||||
add_index "changesets_issues", ["changeset_id", "issue_id"], :name => "changesets_issues_ids", :unique => true
|
add_index "changesets_issues", ["changeset_id", "issue_id"], :name => "changesets_issues_ids", :unique => true
|
||||||
|
|
||||||
create_table "code_review_assignments", :force => true do |t|
|
|
||||||
t.integer "issue_id"
|
|
||||||
t.integer "change_id"
|
|
||||||
t.integer "attachment_id"
|
|
||||||
t.string "file_path"
|
|
||||||
t.string "rev"
|
|
||||||
t.string "rev_to"
|
|
||||||
t.string "action_type"
|
|
||||||
t.integer "changeset_id"
|
|
||||||
end
|
|
||||||
|
|
||||||
create_table "code_review_project_settings", :force => true do |t|
|
|
||||||
t.integer "project_id"
|
|
||||||
t.integer "tracker_id"
|
|
||||||
t.datetime "created_at"
|
|
||||||
t.datetime "updated_at"
|
|
||||||
t.integer "updated_by"
|
|
||||||
t.boolean "hide_code_review_tab", :default => false
|
|
||||||
t.integer "auto_relation", :default => 1
|
|
||||||
t.integer "assignment_tracker_id"
|
|
||||||
t.text "auto_assign"
|
|
||||||
t.integer "lock_version", :default => 0, :null => false
|
|
||||||
t.boolean "tracker_in_review_dialog", :default => false
|
|
||||||
end
|
|
||||||
|
|
||||||
create_table "code_review_user_settings", :force => true do |t|
|
|
||||||
t.integer "user_id", :default => 0, :null => false
|
|
||||||
t.integer "mail_notification", :default => 0, :null => false
|
|
||||||
t.datetime "created_at"
|
|
||||||
t.datetime "updated_at"
|
|
||||||
end
|
|
||||||
|
|
||||||
create_table "code_reviews", :force => true do |t|
|
|
||||||
t.integer "project_id"
|
|
||||||
t.integer "change_id"
|
|
||||||
t.datetime "created_at"
|
|
||||||
t.datetime "updated_at"
|
|
||||||
t.integer "line"
|
|
||||||
t.integer "updated_by_id"
|
|
||||||
t.integer "lock_version", :default => 0, :null => false
|
|
||||||
t.integer "status_changed_from"
|
|
||||||
t.integer "status_changed_to"
|
|
||||||
t.integer "issue_id"
|
|
||||||
t.string "action_type"
|
|
||||||
t.string "file_path"
|
|
||||||
t.string "rev"
|
|
||||||
t.string "rev_to"
|
|
||||||
t.integer "attachment_id"
|
|
||||||
t.integer "file_count", :default => 0, :null => false
|
|
||||||
t.boolean "diff_all"
|
|
||||||
end
|
|
||||||
|
|
||||||
create_table "comments", :force => true do |t|
|
create_table "comments", :force => true do |t|
|
||||||
t.string "commented_type", :limit => 30, :default => "", :null => false
|
t.string "commented_type", :limit => 30, :default => "", :null => false
|
||||||
t.integer "commented_id", :default => 0, :null => false
|
t.integer "commented_id", :default => 0, :null => false
|
||||||
|
@ -768,7 +716,7 @@ ActiveRecord::Schema.define(:version => 20140618020535) do
|
||||||
t.integer "osp_id"
|
t.integer "osp_id"
|
||||||
t.integer "parent_id"
|
t.integer "parent_id"
|
||||||
t.string "subject", :null => false
|
t.string "subject", :null => false
|
||||||
t.text "content", :limit => 16777215, :null => false
|
t.text "content", :null => false
|
||||||
t.integer "author_id"
|
t.integer "author_id"
|
||||||
t.integer "replies_count", :default => 0
|
t.integer "replies_count", :default => 0
|
||||||
t.integer "last_reply_id"
|
t.integer "last_reply_id"
|
||||||
|
@ -1013,13 +961,11 @@ ActiveRecord::Schema.define(:version => 20140618020535) do
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "user_scores", :force => true do |t|
|
create_table "user_scores", :force => true do |t|
|
||||||
t.integer "user_id", :null => false
|
t.integer "user_id"
|
||||||
t.integer "collaboration"
|
t.integer "collaboration"
|
||||||
t.integer "influence"
|
t.integer "influence"
|
||||||
t.integer "skill"
|
t.integer "skill"
|
||||||
t.integer "active"
|
t.integer "activity"
|
||||||
t.datetime "created_at", :null => false
|
|
||||||
t.datetime "updated_at", :null => false
|
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "user_statuses", :force => true do |t|
|
create_table "user_statuses", :force => true do |t|
|
||||||
|
|
|
@ -53,6 +53,10 @@ class AttachmentTest < ActiveSupport::TestCase
|
||||||
assert_equal 0, a.downloads
|
assert_equal 0, a.downloads
|
||||||
assert_equal '1478adae0d4eb06d35897518540e25d6', a.digest
|
assert_equal '1478adae0d4eb06d35897518540e25d6', a.digest
|
||||||
|
|
||||||
|
#新增的属性检查
|
||||||
|
assert_equal 'txt',a.suffix_type
|
||||||
|
assert_equal 'txt',a.show_suffix_type
|
||||||
|
|
||||||
assert a.disk_directory
|
assert a.disk_directory
|
||||||
assert_match %r{\A\d{4}/\d{2}\z}, a.disk_directory
|
assert_match %r{\A\d{4}/\d{2}\z}, a.disk_directory
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue