Commit 83008eab529b1394f9dafca0129abfdb14a579ab
1 parent
f1173601
Exists in
master
and in
22 other branches
Alterações em content_viewer_controller_test e schema.rb
Showing
2 changed files
with
107 additions
and
2 deletions
Show diff stats
db/schema.rb
| ... | ... | @@ -9,7 +9,7 @@ |
| 9 | 9 | # |
| 10 | 10 | # It's strongly recommended to check this file into your version control system. |
| 11 | 11 | |
| 12 | -ActiveRecord::Schema.define(:version => 20131011164400) do | |
| 12 | +ActiveRecord::Schema.define(:version => 20131121162641) do | |
| 13 | 13 | |
| 14 | 14 | create_table "abuse_reports", :force => true do |t| |
| 15 | 15 | t.integer "reporter_id" |
| ... | ... | @@ -136,6 +136,7 @@ ActiveRecord::Schema.define(:version => 20131011164400) do |
| 136 | 136 | add_index "articles", ["profile_id"], :name => "index_articles_on_profile_id" |
| 137 | 137 | add_index "articles", ["slug"], :name => "index_articles_on_slug" |
| 138 | 138 | add_index "articles", ["translation_of_id"], :name => "index_articles_on_translation_of_id" |
| 139 | + add_index "articles", [nil], :name => "pg_search_plugin_article" | |
| 139 | 140 | |
| 140 | 141 | create_table "articles_categories", :id => false, :force => true do |t| |
| 141 | 142 | t.integer "article_id" |
| ... | ... | @@ -189,6 +190,8 @@ ActiveRecord::Schema.define(:version => 20131011164400) do |
| 189 | 190 | t.string "abbreviation" |
| 190 | 191 | end |
| 191 | 192 | |
| 193 | + add_index "categories", [nil], :name => "pg_search_plugin_category" | |
| 194 | + | |
| 192 | 195 | create_table "categories_profiles", :id => false, :force => true do |t| |
| 193 | 196 | t.integer "profile_id" |
| 194 | 197 | t.integer "category_id" |
| ... | ... | @@ -207,6 +210,8 @@ ActiveRecord::Schema.define(:version => 20131011164400) do |
| 207 | 210 | t.datetime "updated_at" |
| 208 | 211 | end |
| 209 | 212 | |
| 213 | + add_index "certifiers", [nil], :name => "pg_search_plugin_certifier" | |
| 214 | + | |
| 210 | 215 | create_table "comments", :force => true do |t| |
| 211 | 216 | t.string "title" |
| 212 | 217 | t.text "body" |
| ... | ... | @@ -221,9 +226,11 @@ ActiveRecord::Schema.define(:version => 20131011164400) do |
| 221 | 226 | t.string "source_type" |
| 222 | 227 | t.string "user_agent" |
| 223 | 228 | t.string "referrer" |
| 229 | + t.integer "group_id" | |
| 224 | 230 | end |
| 225 | 231 | |
| 226 | 232 | add_index "comments", ["source_id", "spam"], :name => "index_comments_on_source_id_and_spam" |
| 233 | + add_index "comments", [nil], :name => "pg_search_plugin_comment" | |
| 227 | 234 | |
| 228 | 235 | create_table "contact_lists", :force => true do |t| |
| 229 | 236 | t.text "list" |
| ... | ... | @@ -233,6 +240,50 @@ ActiveRecord::Schema.define(:version => 20131011164400) do |
| 233 | 240 | t.datetime "updated_at" |
| 234 | 241 | end |
| 235 | 242 | |
| 243 | + create_table "custom_forms_plugin_answers", :force => true do |t| | |
| 244 | + t.text "value" | |
| 245 | + t.integer "field_id" | |
| 246 | + t.integer "submission_id" | |
| 247 | + end | |
| 248 | + | |
| 249 | + create_table "custom_forms_plugin_fields", :force => true do |t| | |
| 250 | + t.string "name" | |
| 251 | + t.string "slug" | |
| 252 | + t.string "type" | |
| 253 | + t.string "default_value" | |
| 254 | + t.string "choices" | |
| 255 | + t.float "minimum" | |
| 256 | + t.float "maximum" | |
| 257 | + t.integer "form_id" | |
| 258 | + t.boolean "mandatory", :default => false | |
| 259 | + t.boolean "multiple" | |
| 260 | + t.boolean "list" | |
| 261 | + t.integer "position", :default => 0 | |
| 262 | + end | |
| 263 | + | |
| 264 | + create_table "custom_forms_plugin_forms", :force => true do |t| | |
| 265 | + t.string "name" | |
| 266 | + t.string "slug" | |
| 267 | + t.text "description" | |
| 268 | + t.integer "profile_id" | |
| 269 | + t.datetime "begining" | |
| 270 | + t.datetime "ending" | |
| 271 | + t.boolean "report_submissions", :default => false | |
| 272 | + t.boolean "on_membership", :default => false | |
| 273 | + t.string "access" | |
| 274 | + t.datetime "created_at" | |
| 275 | + t.datetime "updated_at" | |
| 276 | + end | |
| 277 | + | |
| 278 | + create_table "custom_forms_plugin_submissions", :force => true do |t| | |
| 279 | + t.string "author_name" | |
| 280 | + t.string "author_email" | |
| 281 | + t.integer "profile_id" | |
| 282 | + t.integer "form_id" | |
| 283 | + t.datetime "created_at" | |
| 284 | + t.datetime "updated_at" | |
| 285 | + end | |
| 286 | + | |
| 236 | 287 | create_table "delayed_jobs", :force => true do |t| |
| 237 | 288 | t.integer "priority", :default => 0 |
| 238 | 289 | t.integer "attempts", :default => 0 |
| ... | ... | @@ -273,6 +324,7 @@ ActiveRecord::Schema.define(:version => 20131011164400) do |
| 273 | 324 | t.text "signup_welcome_text" |
| 274 | 325 | t.string "languages" |
| 275 | 326 | t.string "default_language" |
| 327 | + t.text "send_email_plugin_allow_to" | |
| 276 | 328 | end |
| 277 | 329 | |
| 278 | 330 | create_table "external_feeds", :force => true do |t| |
| ... | ... | @@ -297,6 +349,10 @@ ActiveRecord::Schema.define(:version => 20131011164400) do |
| 297 | 349 | t.integer "enterprise_id" |
| 298 | 350 | end |
| 299 | 351 | |
| 352 | + create_table "foo_plugin_bars", :force => true do |t| | |
| 353 | + t.string "name" | |
| 354 | + end | |
| 355 | + | |
| 300 | 356 | create_table "friendships", :force => true do |t| |
| 301 | 357 | t.integer "person_id" |
| 302 | 358 | t.integer "friend_id" |
| ... | ... | @@ -342,6 +398,8 @@ ActiveRecord::Schema.define(:version => 20131011164400) do |
| 342 | 398 | t.integer "environment_id", :null => false |
| 343 | 399 | end |
| 344 | 400 | |
| 401 | + add_index "licenses", [nil], :name => "pg_search_plugin_license" | |
| 402 | + | |
| 345 | 403 | create_table "mailing_sents", :force => true do |t| |
| 346 | 404 | t.integer "mailing_id" |
| 347 | 405 | t.integer "person_id" |
| ... | ... | @@ -376,6 +434,7 @@ ActiveRecord::Schema.define(:version => 20131011164400) do |
| 376 | 434 | |
| 377 | 435 | add_index "national_regions", ["name"], :name => "name_index" |
| 378 | 436 | add_index "national_regions", ["national_region_code"], :name => "code_index" |
| 437 | + add_index "national_regions", [nil], :name => "pg_search_plugin_nationalregion" | |
| 379 | 438 | |
| 380 | 439 | create_table "price_details", :force => true do |t| |
| 381 | 440 | t.decimal "price", :default => 0.0 |
| ... | ... | @@ -456,11 +515,14 @@ ActiveRecord::Schema.define(:version => 20131011164400) do |
| 456 | 515 | t.boolean "is_template", :default => false |
| 457 | 516 | t.integer "template_id" |
| 458 | 517 | t.string "redirection_after_login" |
| 518 | + t.string "usp_id" | |
| 519 | + t.integer "bar_id" | |
| 459 | 520 | end |
| 460 | 521 | |
| 461 | 522 | add_index "profiles", ["environment_id"], :name => "index_profiles_on_environment_id" |
| 462 | 523 | add_index "profiles", ["identifier"], :name => "index_profiles_on_identifier" |
| 463 | 524 | add_index "profiles", ["region_id"], :name => "index_profiles_on_region_id" |
| 525 | + add_index "profiles", [nil], :name => "pg_search_plugin_profile" | |
| 464 | 526 | |
| 465 | 527 | create_table "qualifier_certifiers", :force => true do |t| |
| 466 | 528 | t.integer "qualifier_id" |
| ... | ... | @@ -474,6 +536,8 @@ ActiveRecord::Schema.define(:version => 20131011164400) do |
| 474 | 536 | t.datetime "updated_at" |
| 475 | 537 | end |
| 476 | 538 | |
| 539 | + add_index "qualifiers", [nil], :name => "pg_search_plugin_qualifier" | |
| 540 | + | |
| 477 | 541 | create_table "refused_join_community", :id => false, :force => true do |t| |
| 478 | 542 | t.integer "person_id" |
| 479 | 543 | t.integer "community_id" |
| ... | ... | @@ -520,6 +584,32 @@ ActiveRecord::Schema.define(:version => 20131011164400) do |
| 520 | 584 | t.integer "context_id" |
| 521 | 585 | end |
| 522 | 586 | |
| 587 | + add_index "scraps", [nil], :name => "pg_search_plugin_scrap" | |
| 588 | + | |
| 589 | + create_table "shopping_cart_plugin_purchase_orders", :force => true do |t| | |
| 590 | + t.integer "customer_id" | |
| 591 | + t.integer "seller_id" | |
| 592 | + t.text "data" | |
| 593 | + t.integer "status" | |
| 594 | + t.datetime "created_at" | |
| 595 | + t.datetime "updated_at" | |
| 596 | + end | |
| 597 | + | |
| 598 | + create_table "sub_organizations_plugin_approve_paternity_relations", :force => true do |t| | |
| 599 | + t.integer "task_id" | |
| 600 | + t.integer "parent_id" | |
| 601 | + t.string "parent_type" | |
| 602 | + t.integer "child_id" | |
| 603 | + t.string "child_type" | |
| 604 | + end | |
| 605 | + | |
| 606 | + create_table "sub_organizations_plugin_relations", :force => true do |t| | |
| 607 | + t.integer "parent_id" | |
| 608 | + t.string "parent_type" | |
| 609 | + t.integer "child_id" | |
| 610 | + t.string "child_type" | |
| 611 | + end | |
| 612 | + | |
| 523 | 613 | create_table "taggings", :force => true do |t| |
| 524 | 614 | t.integer "tag_id" |
| 525 | 615 | t.integer "taggable_id" |
| ... | ... | @@ -562,6 +652,19 @@ ActiveRecord::Schema.define(:version => 20131011164400) do |
| 562 | 652 | t.string "thumbnail" |
| 563 | 653 | end |
| 564 | 654 | |
| 655 | + create_table "tolerance_time_plugin_publications", :force => true do |t| | |
| 656 | + t.integer "target_id" | |
| 657 | + t.string "target_type" | |
| 658 | + t.datetime "created_at" | |
| 659 | + t.datetime "updated_at" | |
| 660 | + end | |
| 661 | + | |
| 662 | + create_table "tolerance_time_plugin_tolerances", :force => true do |t| | |
| 663 | + t.integer "profile_id" | |
| 664 | + t.integer "content_tolerance" | |
| 665 | + t.integer "comment_tolerance" | |
| 666 | + end | |
| 667 | + | |
| 565 | 668 | create_table "units", :force => true do |t| |
| 566 | 669 | t.string "singular", :null => false |
| 567 | 670 | t.string "plural", :null => false | ... | ... |
test/functional/content_viewer_controller_test.rb
| ... | ... | @@ -1195,7 +1195,9 @@ class ContentViewerControllerTest < ActionController::TestCase |
| 1195 | 1195 | end |
| 1196 | 1196 | |
| 1197 | 1197 | should 'display differences between article versions' do |
| 1198 | - ContentViewerController.versioning_articles('/files/test.txt','/files/test.txt') | |
| 1198 | + file1 = UploadedFile.create!(:uploaded_data => fixture_file_upload('/files/test.txt', 'bin/unknown'), :profile => profile) | |
| 1199 | + file2 = UploadedFile.create!(:uploaded_data => fixture_file_upload('/files/test.txt', 'bin/unknown'), :profile => profile) | |
| 1200 | + ContentViewerController.versioning_articles('file1','file2') | |
| 1199 | 1201 | end |
| 1200 | 1202 | |
| 1201 | 1203 | should 'not display comments marked as spam' do | ... | ... |