Commit a048e4a4 authored by Gustav Ernberg's avatar Gustav Ernberg

Fixed style on unsubscribe page

Removed unnecassary logic

Added missing 'the'

Fix case

Fixed specs
parent 3ad3f906
- noteable = @sent_notification.noteable - noteable = @sent_notification.noteable
- noteable_type = @sent_notification.noteable_type.humanize(capitalize: false) - noteable_type = @sent_notification.noteable_type.titleize.downcase
- noteable_text = %(#{noteable.title} (#{noteable.to_reference})) - noteable_text = %(#{noteable.title} (#{noteable.to_reference}))
- page_title "Unsubscribe", noteable_text, noteable_type.pluralize, @sent_notification.project.name_with_namespace
- page_title "Unsubscribe", noteable_text, @sent_notification.noteable_type.humanize.pluralize, @sent_notification.project.name_with_namespace
%h3.page-title %h3.page-title
Unsubscribe from #{noteable_type} #{noteable_text} Unsubscribe from #{noteable_type}
%p %p
= succeed '?' do = succeed '?' do
Are you sure you want to unsubscribe from #{noteable_type} Are you sure you want to unsubscribe from the #{noteable_type}:
= link_to noteable_text, url_for([@sent_notification.project.namespace.becomes(Namespace), @sent_notification.project, noteable]) = link_to noteable_text, url_for([@sent_notification.project.namespace.becomes(Namespace), @sent_notification.project, noteable])
%p %p
......
---
title: Fixed style on unsubscribe page
merge_request:
author: Gustav Ernberg
...@@ -24,8 +24,8 @@ describe 'Unsubscribe links', feature: true do ...@@ -24,8 +24,8 @@ describe 'Unsubscribe links', feature: true do
visit body_link visit body_link
expect(current_path).to eq unsubscribe_sent_notification_path(SentNotification.last) expect(current_path).to eq unsubscribe_sent_notification_path(SentNotification.last)
expect(page).to have_text(%(Unsubscribe from issue #{issue.title} (#{issue.to_reference}))) expect(page).to have_text(%(Unsubscribe from issue))
expect(page).to have_text(%(Are you sure you want to unsubscribe from issue #{issue.title} (#{issue.to_reference})?)) expect(page).to have_text(%(Are you sure you want to unsubscribe from the issue: #{issue.title} (#{issue.to_reference})?))
expect(issue.subscribed?(recipient, project)).to be_truthy expect(issue.subscribed?(recipient, project)).to be_truthy
click_link 'Unsubscribe' click_link 'Unsubscribe'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment