修改资源文件测试用例

This commit is contained in:
nwb 2014-06-25 16:26:19 +08:00
parent ff67e3dbfe
commit c5a837c689
4 changed files with 34 additions and 83 deletions

18
Gemfile
View File

@ -25,6 +25,16 @@ group :development do
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
# in production environments by default.
group :assets do
@ -42,14 +52,6 @@ group :ldap do
gem "net-ldap", "~> 0.3.1"
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
group :rmagick do

View File

@ -68,10 +68,9 @@ GEM
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.6.1)
coffee-script-source (1.7.0)
erubis (2.7.0)
execjs (1.4.0)
multi_json (~> 1.0)
execjs (2.0.2)
fastercsv (1.5.0)
ffi (1.9.3-x86-mingw32)
hike (1.2.3)
@ -124,7 +123,7 @@ GEM
rmagick (2.13.2)
ruby-openid (2.1.8)
rubyzip (1.1.4)
sass (3.2.7)
sass (3.2.14)
sass-rails (3.2.6)
railties (~> 3.2.0)
sass (>= 3.1.10)
@ -151,9 +150,9 @@ GEM
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.37)
uglifier (1.0.3)
uglifier (2.4.0)
execjs (>= 0.3.0)
multi_json (>= 1.0.2)
json (>= 1.8.0)
websocket (1.0.7)
xpath (1.0.0)
nokogiri (~> 1.3)

View File

@ -174,58 +174,6 @@ ActiveRecord::Schema.define(:version => 20140618020535) do
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|
t.string "commented_type", :limit => 30, :default => "", :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 "parent_id"
t.string "subject", :null => false
t.text "content", :limit => 16777215, :null => false
t.text "content", :null => false
t.integer "author_id"
t.integer "replies_count", :default => 0
t.integer "last_reply_id"
@ -1013,13 +961,11 @@ ActiveRecord::Schema.define(:version => 20140618020535) do
end
create_table "user_scores", :force => true do |t|
t.integer "user_id", :null => false
t.integer "user_id"
t.integer "collaboration"
t.integer "influence"
t.integer "skill"
t.integer "active"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.integer "activity"
end
create_table "user_statuses", :force => true do |t|

View File

@ -53,6 +53,10 @@ class AttachmentTest < ActiveSupport::TestCase
assert_equal 0, a.downloads
assert_equal '1478adae0d4eb06d35897518540e25d6', a.digest
#新增的属性检查
assert_equal 'txt',a.suffix_type
assert_equal 'txt',a.show_suffix_type
assert a.disk_directory
assert_match %r{\A\d{4}/\d{2}\z}, a.disk_directory