Skip to content
45 changes: 18 additions & 27 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,24 @@
inherit_gem:
decidim-dev: rubocop-decidim.yml

# Override inherited require statements to avoid loading extensions
# that may not be available in all environments
require:
- rubocop-rails
- rubocop-rspec
- rubocop-faker
inherit_mode:
merge:
- Exclude

AllCops:
Include:
- "**/*.rb"
- "**/*.rake"
- "**/*.ru"
- "**/Gemfile"
- "**/Rakefile"
Exclude:
- 'db/schema.rb'
- 'db/migrate/**/*.rb'
- decidim-signature_collection/spec/decidim_dummy_app/**/*

Layout/SpaceAroundOperators:
Enabled: false

Rails/BulkChangeTable:
Enabled: false

Rails/ThreeStateBooleanColumn:
Enabled: false

Style/FetchEnvVar:
Enabled: false

RSpec/DescribeClass:
Enabled: false

RSpec/NoExpectationExample:
Enabled: false
- "spec/decidim_dummy_app/**/*"
- "**/spec/decidim_dummy_app/**/*"
- "bin/**/*"
- "node_modules/**/*"
- "**/node_modules/**/*"
- "db/schema.rb"
- "db/migrate/*"
- "vendor/**/*"
- "**/vendor/**/*"
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ source "https://rubygems.org"

ruby RUBY_VERSION

DECIDIM_VERSION= "0.30.3"
DECIDIM_VERSION = "0.30.3"

gem "decidim", DECIDIM_VERSION
gem "decidim-core", DECIDIM_VERSION
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,12 @@ def call
delegate :candidacy, to: :form

def create_vote
vote = candidacy.votes.create!(
candidacy.votes.create!(
encrypted_xml_doc_to_sign: form.encrypted_xml_doc_to_sign,
encrypted_metadata: form.encrypted_metadata,
filename: form.filename,
hash_id: form.hash_id
)

vote
end

def timestamp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def submit_and_validate
select "In-person", from: "candidacy_signature_type"
end
submit_and_validate
expect(candidacy.reload.signature_type).to eq("in_person")
end

it "displays candidacy attachments" do
Expand All @@ -77,6 +78,7 @@ def submit_and_validate
select "In-person", from: "candidacy_signature_type"
end
submit_and_validate
expect(candidacy.reload.signature_type).to eq("in_person")
end

it "displays candidacy attachments" do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@

it "votes as themselves" do
vote_candidacy

within ".candidacy__aside" do
expect(page).to have_content(signature_text(1))
end
end
end
end
Expand Down Expand Up @@ -150,6 +154,10 @@

it "adds the signature" do
vote_candidacy

within ".candidacy__aside" do
expect(page).to have_content(signature_text(1))
end
end
end

Expand Down
Loading