From 8e4a39a066c99e19e55c752cdad73bb76cd96bb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mar=C3=ADa=20Checa?= Date: Tue, 19 Dec 2017 20:45:23 +0100 Subject: [PATCH] Updated schema and fixed tests --- db/schema.rb | 2 +- spec/shared/features/relationable.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/db/schema.rb b/db/schema.rb index 014d81682..b571c86f0 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -862,7 +862,7 @@ ActiveRecord::Schema.define(version: 20171219111046) do t.integer "related_content_id" t.datetime "created_at" t.datetime "updated_at" - t.integer "positive_score", default: 0 + t.integer "positive_score", default: 1 t.integer "negative_score", default: 0 end diff --git a/spec/shared/features/relationable.rb b/spec/shared/features/relationable.rb index 6ff423445..6ebf948a6 100644 --- a/spec/shared/features/relationable.rb +++ b/spec/shared/features/relationable.rb @@ -83,8 +83,8 @@ shared_examples "relationable" do |relationable_model_name| expect(page).to_not have_css("#score-positive-related-#{related_content.opposite_related_content.id}") end - expect(related_content.reload.positive_score).to eq(1) - expect(related_content.opposite_related_content.reload.positive_score).to eq(1) + expect(related_content.reload.positive_score).to eq(2) + expect(related_content.opposite_related_content.reload.positive_score).to eq(2) end scenario 'related content can be scored negatively', :js do