From 83008eab529b1394f9dafca0129abfdb14a579ab Mon Sep 17 00:00:00 2001 From: Junior Silva Date: Fri, 17 Jan 2014 14:38:42 -0300 Subject: [PATCH] Alterações em content_viewer_controller_test e schema.rb --- db/schema.rb | 105 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- test/functional/content_viewer_controller_test.rb | 4 +++- 2 files changed, 107 insertions(+), 2 deletions(-) diff --git a/db/schema.rb b/db/schema.rb index d26d0a9..f203c9a 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -9,7 +9,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20131011164400) do +ActiveRecord::Schema.define(:version => 20131121162641) do create_table "abuse_reports", :force => true do |t| t.integer "reporter_id" @@ -136,6 +136,7 @@ ActiveRecord::Schema.define(:version => 20131011164400) do add_index "articles", ["profile_id"], :name => "index_articles_on_profile_id" add_index "articles", ["slug"], :name => "index_articles_on_slug" add_index "articles", ["translation_of_id"], :name => "index_articles_on_translation_of_id" + add_index "articles", [nil], :name => "pg_search_plugin_article" create_table "articles_categories", :id => false, :force => true do |t| t.integer "article_id" @@ -189,6 +190,8 @@ ActiveRecord::Schema.define(:version => 20131011164400) do t.string "abbreviation" end + add_index "categories", [nil], :name => "pg_search_plugin_category" + create_table "categories_profiles", :id => false, :force => true do |t| t.integer "profile_id" t.integer "category_id" @@ -207,6 +210,8 @@ ActiveRecord::Schema.define(:version => 20131011164400) do t.datetime "updated_at" end + add_index "certifiers", [nil], :name => "pg_search_plugin_certifier" + create_table "comments", :force => true do |t| t.string "title" t.text "body" @@ -221,9 +226,11 @@ ActiveRecord::Schema.define(:version => 20131011164400) do t.string "source_type" t.string "user_agent" t.string "referrer" + t.integer "group_id" end add_index "comments", ["source_id", "spam"], :name => "index_comments_on_source_id_and_spam" + add_index "comments", [nil], :name => "pg_search_plugin_comment" create_table "contact_lists", :force => true do |t| t.text "list" @@ -233,6 +240,50 @@ ActiveRecord::Schema.define(:version => 20131011164400) do t.datetime "updated_at" end + create_table "custom_forms_plugin_answers", :force => true do |t| + t.text "value" + t.integer "field_id" + t.integer "submission_id" + end + + create_table "custom_forms_plugin_fields", :force => true do |t| + t.string "name" + t.string "slug" + t.string "type" + t.string "default_value" + t.string "choices" + t.float "minimum" + t.float "maximum" + t.integer "form_id" + t.boolean "mandatory", :default => false + t.boolean "multiple" + t.boolean "list" + t.integer "position", :default => 0 + end + + create_table "custom_forms_plugin_forms", :force => true do |t| + t.string "name" + t.string "slug" + t.text "description" + t.integer "profile_id" + t.datetime "begining" + t.datetime "ending" + t.boolean "report_submissions", :default => false + t.boolean "on_membership", :default => false + t.string "access" + t.datetime "created_at" + t.datetime "updated_at" + end + + create_table "custom_forms_plugin_submissions", :force => true do |t| + t.string "author_name" + t.string "author_email" + t.integer "profile_id" + t.integer "form_id" + t.datetime "created_at" + t.datetime "updated_at" + end + create_table "delayed_jobs", :force => true do |t| t.integer "priority", :default => 0 t.integer "attempts", :default => 0 @@ -273,6 +324,7 @@ ActiveRecord::Schema.define(:version => 20131011164400) do t.text "signup_welcome_text" t.string "languages" t.string "default_language" + t.text "send_email_plugin_allow_to" end create_table "external_feeds", :force => true do |t| @@ -297,6 +349,10 @@ ActiveRecord::Schema.define(:version => 20131011164400) do t.integer "enterprise_id" end + create_table "foo_plugin_bars", :force => true do |t| + t.string "name" + end + create_table "friendships", :force => true do |t| t.integer "person_id" t.integer "friend_id" @@ -342,6 +398,8 @@ ActiveRecord::Schema.define(:version => 20131011164400) do t.integer "environment_id", :null => false end + add_index "licenses", [nil], :name => "pg_search_plugin_license" + create_table "mailing_sents", :force => true do |t| t.integer "mailing_id" t.integer "person_id" @@ -376,6 +434,7 @@ ActiveRecord::Schema.define(:version => 20131011164400) do add_index "national_regions", ["name"], :name => "name_index" add_index "national_regions", ["national_region_code"], :name => "code_index" + add_index "national_regions", [nil], :name => "pg_search_plugin_nationalregion" create_table "price_details", :force => true do |t| t.decimal "price", :default => 0.0 @@ -456,11 +515,14 @@ ActiveRecord::Schema.define(:version => 20131011164400) do t.boolean "is_template", :default => false t.integer "template_id" t.string "redirection_after_login" + t.string "usp_id" + t.integer "bar_id" end add_index "profiles", ["environment_id"], :name => "index_profiles_on_environment_id" add_index "profiles", ["identifier"], :name => "index_profiles_on_identifier" add_index "profiles", ["region_id"], :name => "index_profiles_on_region_id" + add_index "profiles", [nil], :name => "pg_search_plugin_profile" create_table "qualifier_certifiers", :force => true do |t| t.integer "qualifier_id" @@ -474,6 +536,8 @@ ActiveRecord::Schema.define(:version => 20131011164400) do t.datetime "updated_at" end + add_index "qualifiers", [nil], :name => "pg_search_plugin_qualifier" + create_table "refused_join_community", :id => false, :force => true do |t| t.integer "person_id" t.integer "community_id" @@ -520,6 +584,32 @@ ActiveRecord::Schema.define(:version => 20131011164400) do t.integer "context_id" end + add_index "scraps", [nil], :name => "pg_search_plugin_scrap" + + create_table "shopping_cart_plugin_purchase_orders", :force => true do |t| + t.integer "customer_id" + t.integer "seller_id" + t.text "data" + t.integer "status" + t.datetime "created_at" + t.datetime "updated_at" + end + + create_table "sub_organizations_plugin_approve_paternity_relations", :force => true do |t| + t.integer "task_id" + t.integer "parent_id" + t.string "parent_type" + t.integer "child_id" + t.string "child_type" + end + + create_table "sub_organizations_plugin_relations", :force => true do |t| + t.integer "parent_id" + t.string "parent_type" + t.integer "child_id" + t.string "child_type" + end + create_table "taggings", :force => true do |t| t.integer "tag_id" t.integer "taggable_id" @@ -562,6 +652,19 @@ ActiveRecord::Schema.define(:version => 20131011164400) do t.string "thumbnail" end + create_table "tolerance_time_plugin_publications", :force => true do |t| + t.integer "target_id" + t.string "target_type" + t.datetime "created_at" + t.datetime "updated_at" + end + + create_table "tolerance_time_plugin_tolerances", :force => true do |t| + t.integer "profile_id" + t.integer "content_tolerance" + t.integer "comment_tolerance" + end + create_table "units", :force => true do |t| t.string "singular", :null => false t.string "plural", :null => false diff --git a/test/functional/content_viewer_controller_test.rb b/test/functional/content_viewer_controller_test.rb index 1af7e05..1de9887 100644 --- a/test/functional/content_viewer_controller_test.rb +++ b/test/functional/content_viewer_controller_test.rb @@ -1195,7 +1195,9 @@ class ContentViewerControllerTest < ActionController::TestCase end should 'display differences between article versions' do - ContentViewerController.versioning_articles('/files/test.txt','/files/test.txt') + file1 = UploadedFile.create!(:uploaded_data => fixture_file_upload('/files/test.txt', 'bin/unknown'), :profile => profile) + file2 = UploadedFile.create!(:uploaded_data => fixture_file_upload('/files/test.txt', 'bin/unknown'), :profile => profile) + ContentViewerController.versioning_articles('file1','file2') end should 'not display comments marked as spam' do -- libgit2 0.21.2