Simplify Settings API

This commit is contained in:
Josep Jaume Rey Peroy
2015-12-10 11:26:42 +01:00
parent 89ece16fe8
commit 5de3d700e4
16 changed files with 64 additions and 46 deletions

View File

@@ -1,3 +1,4 @@
# coding: utf-8
require 'rails_helper'
feature 'Proposals' do
@@ -342,7 +343,7 @@ feature 'Proposals' do
scenario 'Update should not be posible if proposal is not editable' do
proposal = create(:proposal)
Setting.find_by(key: "max_votes_for_proposal_edit").update(value: 10)
Setting["max_votes_for_proposal_edit"] = 10
11.times { create(:vote, votable: proposal) }
expect(proposal).to_not be_editable