Skip to content

Commit

Permalink
fix: pending rubocop issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Asrani-Aman committed Aug 13, 2024
1 parent 61c7cb5 commit 32ca202
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 12 deletions.
21 changes: 21 additions & 0 deletions app/views/contests/_update_contest_confirmation.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<div id="update-contest-modal" class="modal fade" role="dialog">
<div class="modal-dialog primary-modal-dialog">
<div class="modal-content">
<div class="modal-header primary-modal-header">
<h4 class="modal-title">Update Contest Deadline</h4>
<button type="button" class="close" data-dismiss="modal">&times;</button>
</div>
<%= form_with(url: update_contest_path(":contest_id"), method: :patch, local: true, id: 'update-contest-form') do |form| %>
<div class="modal-body">
<div class="form-group">
<%= form.label :deadline, "New Deadline" %>
<%= form.datetime_local_field :deadline, class: "form-control", id: "contest_deadline" %>
</div>
</div>
<div class="modal-footer">
<%= form.submit "Update Deadline", class: "btn btn-primary" %>
</div>
<% end %>
</div>
</div>
</div>
12 changes: 6 additions & 6 deletions spec/components/previews/social_card_component_preview.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ def default(
description: "[email protected]"
)
render(SocialCardComponent.new(
link_url: link_url,
image_path: image_path,
image_alt: image_alt,
heading: heading,
description: description
))
link_url: link_url,
image_path: image_path,
image_alt: image_alt,
heading: heading,
description: description
))
end
end
12 changes: 6 additions & 6 deletions spec/components/social_card_component_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
RSpec.describe SocialCardComponent, type: :component do
it "renders the social card with correct content" do
render_inline(described_class.new(
link_url: "https://github.com/CircuitVerse",
image_path: "SVGs/github.svg",
image_alt: "Github Logo",
heading: "Contribute at GitHub",
description: "Help us improve CircuitVerse"
))
link_url: "https://github.com/CircuitVerse",
image_path: "SVGs/github.svg",
image_alt: "Github Logo",
heading: "Contribute at GitHub",
description: "Help us improve CircuitVerse"
))

expect(page).to have_css(".social-card.contribute-social-card")
expect(page).to have_link(href: "https://github.com/CircuitVerse")
Expand Down

0 comments on commit 32ca202

Please sign in to comment.