Skip to content

Commit 0b7a920

Browse files
committed
Fix rubocop offenses
1 parent ec635e9 commit 0b7a920

3 files changed

Lines changed: 12 additions & 12 deletions

File tree

decidim-admin/spec/cells/decidim/admin/content_block_cell_spec.rb renamed to decidim-admin/spec/cells/decidim/admin/homepage_content_block_cell_spec.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
describe Decidim::Admin::HomepageContentBlockCell, type: :cell do
66
controller Decidim::Admin::OrganizationHomepageController
77

8+
subject { cell("decidim/admin/homepage_content_block", content_block).call }
9+
810
let(:organization) { create(:organization) }
911
let(:content_block) { create(:content_block, organization:, manifest_name: :hero, scope_name: :homepage) }
1012

11-
subject { cell("decidim/admin/homepage_content_block", content_block).call }
12-
1313
it "renders the content block name" do
1414
expect(subject).to have_content("Hero image")
1515
end
@@ -30,8 +30,8 @@
3030
let(:content_block) { build(:content_block, organization:, manifest_name: :hero, scope_name: :homepage) }
3131

3232
it "does not render edit or destroy links" do
33-
expect(subject).not_to have_link(href: %r{/content_blocks/\d+/edit$})
34-
expect(subject).not_to have_css('a[data-method="delete"]')
33+
expect(subject).to have_no_link(href: %r{/content_blocks/\d+/edit$})
34+
expect(subject).to have_no_css('a[data-method="delete"]')
3535
end
3636
end
3737

@@ -41,7 +41,7 @@
4141
end
4242

4343
it "does not render edit link" do
44-
expect(subject).not_to have_link(href: /edit/)
44+
expect(subject).to have_no_link(href: /edit/)
4545
end
4646
end
4747
end

decidim-admin/spec/system/admin_publishes_unpublishes_content_blocks_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
require "spec_helper"
44

5-
describe "Admin publishes/unpublishes content blocks", type: :system do
5+
describe "Admin publishes/unpublishes content blocks" do
66
let(:organization) { create(:organization) }
77
let(:user) { create(:user, :admin, :confirmed, organization:) }
88

@@ -54,7 +54,7 @@
5454
expect(hero_block.reload.published_at).to be_nil
5555

5656
visit decidim.root_path
57-
expect(page).not_to have_css("[id^=hero]")
57+
expect(page).to have_no_css("[id^=hero]")
5858
end
5959
end
6060
end

decidim-core/spec/system/homepage_content_blocks_spec.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
require "spec_helper"
44

5-
describe "Homepage with content blocks", type: :system do
5+
describe "Homepage with content blocks" do
66
let(:official_url) { "http://test.example.org" }
77
let(:organization) { create(:organization, official_url:) }
88
let!(:participatory_process) { create(:participatory_process, :promoted, organization:) }
@@ -42,10 +42,10 @@
4242
visit decidim.root_path
4343

4444
hero_section = page.find("section.hero__container")
45-
sub_hero_section = page.find("#sub_hero")
46-
how_to_participate_section = page.find("#how_to_participate")
47-
stats_section = page.find("#statistics")
48-
footer_sub_hero_section = page.find("#footer_sub_hero")
45+
sub_hero_section = page.find_by_id("sub_hero")
46+
how_to_participate_section = page.find_by_id("how_to_participate")
47+
stats_section = page.find_by_id("statistics")
48+
footer_sub_hero_section = page.find_by_id("footer_sub_hero")
4949

5050
hero_position = hero_section.evaluate_script("this.getBoundingClientRect().top")
5151
sub_hero_position = sub_hero_section.evaluate_script("this.getBoundingClientRect().top")

0 commit comments

Comments
 (0)