Commit 83008eab529b1394f9dafca0129abfdb14a579ab
1 parent
f1173601
Exists in
master
and in
29 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,7 +9,7 @@ | ||
9 | # | 9 | # |
10 | # It's strongly recommended to check this file into your version control system. | 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 | create_table "abuse_reports", :force => true do |t| | 14 | create_table "abuse_reports", :force => true do |t| |
15 | t.integer "reporter_id" | 15 | t.integer "reporter_id" |
@@ -136,6 +136,7 @@ ActiveRecord::Schema.define(:version => 20131011164400) do | @@ -136,6 +136,7 @@ ActiveRecord::Schema.define(:version => 20131011164400) do | ||
136 | add_index "articles", ["profile_id"], :name => "index_articles_on_profile_id" | 136 | add_index "articles", ["profile_id"], :name => "index_articles_on_profile_id" |
137 | add_index "articles", ["slug"], :name => "index_articles_on_slug" | 137 | add_index "articles", ["slug"], :name => "index_articles_on_slug" |
138 | add_index "articles", ["translation_of_id"], :name => "index_articles_on_translation_of_id" | 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 | create_table "articles_categories", :id => false, :force => true do |t| | 141 | create_table "articles_categories", :id => false, :force => true do |t| |
141 | t.integer "article_id" | 142 | t.integer "article_id" |
@@ -189,6 +190,8 @@ ActiveRecord::Schema.define(:version => 20131011164400) do | @@ -189,6 +190,8 @@ ActiveRecord::Schema.define(:version => 20131011164400) do | ||
189 | t.string "abbreviation" | 190 | t.string "abbreviation" |
190 | end | 191 | end |
191 | 192 | ||
193 | + add_index "categories", [nil], :name => "pg_search_plugin_category" | ||
194 | + | ||
192 | create_table "categories_profiles", :id => false, :force => true do |t| | 195 | create_table "categories_profiles", :id => false, :force => true do |t| |
193 | t.integer "profile_id" | 196 | t.integer "profile_id" |
194 | t.integer "category_id" | 197 | t.integer "category_id" |
@@ -207,6 +210,8 @@ ActiveRecord::Schema.define(:version => 20131011164400) do | @@ -207,6 +210,8 @@ ActiveRecord::Schema.define(:version => 20131011164400) do | ||
207 | t.datetime "updated_at" | 210 | t.datetime "updated_at" |
208 | end | 211 | end |
209 | 212 | ||
213 | + add_index "certifiers", [nil], :name => "pg_search_plugin_certifier" | ||
214 | + | ||
210 | create_table "comments", :force => true do |t| | 215 | create_table "comments", :force => true do |t| |
211 | t.string "title" | 216 | t.string "title" |
212 | t.text "body" | 217 | t.text "body" |
@@ -221,9 +226,11 @@ ActiveRecord::Schema.define(:version => 20131011164400) do | @@ -221,9 +226,11 @@ ActiveRecord::Schema.define(:version => 20131011164400) do | ||
221 | t.string "source_type" | 226 | t.string "source_type" |
222 | t.string "user_agent" | 227 | t.string "user_agent" |
223 | t.string "referrer" | 228 | t.string "referrer" |
229 | + t.integer "group_id" | ||
224 | end | 230 | end |
225 | 231 | ||
226 | add_index "comments", ["source_id", "spam"], :name => "index_comments_on_source_id_and_spam" | 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 | create_table "contact_lists", :force => true do |t| | 235 | create_table "contact_lists", :force => true do |t| |
229 | t.text "list" | 236 | t.text "list" |
@@ -233,6 +240,50 @@ ActiveRecord::Schema.define(:version => 20131011164400) do | @@ -233,6 +240,50 @@ ActiveRecord::Schema.define(:version => 20131011164400) do | ||
233 | t.datetime "updated_at" | 240 | t.datetime "updated_at" |
234 | end | 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 | create_table "delayed_jobs", :force => true do |t| | 287 | create_table "delayed_jobs", :force => true do |t| |
237 | t.integer "priority", :default => 0 | 288 | t.integer "priority", :default => 0 |
238 | t.integer "attempts", :default => 0 | 289 | t.integer "attempts", :default => 0 |
@@ -273,6 +324,7 @@ ActiveRecord::Schema.define(:version => 20131011164400) do | @@ -273,6 +324,7 @@ ActiveRecord::Schema.define(:version => 20131011164400) do | ||
273 | t.text "signup_welcome_text" | 324 | t.text "signup_welcome_text" |
274 | t.string "languages" | 325 | t.string "languages" |
275 | t.string "default_language" | 326 | t.string "default_language" |
327 | + t.text "send_email_plugin_allow_to" | ||
276 | end | 328 | end |
277 | 329 | ||
278 | create_table "external_feeds", :force => true do |t| | 330 | create_table "external_feeds", :force => true do |t| |
@@ -297,6 +349,10 @@ ActiveRecord::Schema.define(:version => 20131011164400) do | @@ -297,6 +349,10 @@ ActiveRecord::Schema.define(:version => 20131011164400) do | ||
297 | t.integer "enterprise_id" | 349 | t.integer "enterprise_id" |
298 | end | 350 | end |
299 | 351 | ||
352 | + create_table "foo_plugin_bars", :force => true do |t| | ||
353 | + t.string "name" | ||
354 | + end | ||
355 | + | ||
300 | create_table "friendships", :force => true do |t| | 356 | create_table "friendships", :force => true do |t| |
301 | t.integer "person_id" | 357 | t.integer "person_id" |
302 | t.integer "friend_id" | 358 | t.integer "friend_id" |
@@ -342,6 +398,8 @@ ActiveRecord::Schema.define(:version => 20131011164400) do | @@ -342,6 +398,8 @@ ActiveRecord::Schema.define(:version => 20131011164400) do | ||
342 | t.integer "environment_id", :null => false | 398 | t.integer "environment_id", :null => false |
343 | end | 399 | end |
344 | 400 | ||
401 | + add_index "licenses", [nil], :name => "pg_search_plugin_license" | ||
402 | + | ||
345 | create_table "mailing_sents", :force => true do |t| | 403 | create_table "mailing_sents", :force => true do |t| |
346 | t.integer "mailing_id" | 404 | t.integer "mailing_id" |
347 | t.integer "person_id" | 405 | t.integer "person_id" |
@@ -376,6 +434,7 @@ ActiveRecord::Schema.define(:version => 20131011164400) do | @@ -376,6 +434,7 @@ ActiveRecord::Schema.define(:version => 20131011164400) do | ||
376 | 434 | ||
377 | add_index "national_regions", ["name"], :name => "name_index" | 435 | add_index "national_regions", ["name"], :name => "name_index" |
378 | add_index "national_regions", ["national_region_code"], :name => "code_index" | 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 | create_table "price_details", :force => true do |t| | 439 | create_table "price_details", :force => true do |t| |
381 | t.decimal "price", :default => 0.0 | 440 | t.decimal "price", :default => 0.0 |
@@ -456,11 +515,14 @@ ActiveRecord::Schema.define(:version => 20131011164400) do | @@ -456,11 +515,14 @@ ActiveRecord::Schema.define(:version => 20131011164400) do | ||
456 | t.boolean "is_template", :default => false | 515 | t.boolean "is_template", :default => false |
457 | t.integer "template_id" | 516 | t.integer "template_id" |
458 | t.string "redirection_after_login" | 517 | t.string "redirection_after_login" |
518 | + t.string "usp_id" | ||
519 | + t.integer "bar_id" | ||
459 | end | 520 | end |
460 | 521 | ||
461 | add_index "profiles", ["environment_id"], :name => "index_profiles_on_environment_id" | 522 | add_index "profiles", ["environment_id"], :name => "index_profiles_on_environment_id" |
462 | add_index "profiles", ["identifier"], :name => "index_profiles_on_identifier" | 523 | add_index "profiles", ["identifier"], :name => "index_profiles_on_identifier" |
463 | add_index "profiles", ["region_id"], :name => "index_profiles_on_region_id" | 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 | create_table "qualifier_certifiers", :force => true do |t| | 527 | create_table "qualifier_certifiers", :force => true do |t| |
466 | t.integer "qualifier_id" | 528 | t.integer "qualifier_id" |
@@ -474,6 +536,8 @@ ActiveRecord::Schema.define(:version => 20131011164400) do | @@ -474,6 +536,8 @@ ActiveRecord::Schema.define(:version => 20131011164400) do | ||
474 | t.datetime "updated_at" | 536 | t.datetime "updated_at" |
475 | end | 537 | end |
476 | 538 | ||
539 | + add_index "qualifiers", [nil], :name => "pg_search_plugin_qualifier" | ||
540 | + | ||
477 | create_table "refused_join_community", :id => false, :force => true do |t| | 541 | create_table "refused_join_community", :id => false, :force => true do |t| |
478 | t.integer "person_id" | 542 | t.integer "person_id" |
479 | t.integer "community_id" | 543 | t.integer "community_id" |
@@ -520,6 +584,32 @@ ActiveRecord::Schema.define(:version => 20131011164400) do | @@ -520,6 +584,32 @@ ActiveRecord::Schema.define(:version => 20131011164400) do | ||
520 | t.integer "context_id" | 584 | t.integer "context_id" |
521 | end | 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 | create_table "taggings", :force => true do |t| | 613 | create_table "taggings", :force => true do |t| |
524 | t.integer "tag_id" | 614 | t.integer "tag_id" |
525 | t.integer "taggable_id" | 615 | t.integer "taggable_id" |
@@ -562,6 +652,19 @@ ActiveRecord::Schema.define(:version => 20131011164400) do | @@ -562,6 +652,19 @@ ActiveRecord::Schema.define(:version => 20131011164400) do | ||
562 | t.string "thumbnail" | 652 | t.string "thumbnail" |
563 | end | 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 | create_table "units", :force => true do |t| | 668 | create_table "units", :force => true do |t| |
566 | t.string "singular", :null => false | 669 | t.string "singular", :null => false |
567 | t.string "plural", :null => false | 670 | t.string "plural", :null => false |
test/functional/content_viewer_controller_test.rb
@@ -1195,7 +1195,9 @@ class ContentViewerControllerTest < ActionController::TestCase | @@ -1195,7 +1195,9 @@ class ContentViewerControllerTest < ActionController::TestCase | ||
1195 | end | 1195 | end |
1196 | 1196 | ||
1197 | should 'display differences between article versions' do | 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 | end | 1201 | end |
1200 | 1202 | ||
1201 | should 'not display comments marked as spam' do | 1203 | should 'not display comments marked as spam' do |