Updated schema and fixed tests

This commit is contained in:
María Checa
2017-12-19 20:45:23 +01:00
parent a8ca3ec5f7
commit 8e4a39a066
2 changed files with 3 additions and 3 deletions

View File

@@ -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

View File

@@ -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