summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-05-24 17:06:49 +0100
committerPhil Hughes <me@iamphill.com>2016-06-08 10:10:18 +0100
commit8b40a7745be84659c10db02e3bbb74126bd42414 (patch)
treec1bf27d83bba6f7e766e56477e639c8612521cb6
parent79b375e17876105cefcbc5c451e785aceedb0002 (diff)
downloadgitlab-ce-8b40a7745be84659c10db02e3bbb74126bd42414.tar.gz
Updated tests
-rw-r--r--app/helpers/button_helper.rb8
-rw-r--r--app/helpers/commits_helper.rb1
-rw-r--r--app/views/projects/commits/_commit.html.haml2
3 files changed, 9 insertions, 2 deletions
diff --git a/app/helpers/button_helper.rb b/app/helpers/button_helper.rb
index bf5505125ab..fabd726aae9 100644
--- a/app/helpers/button_helper.rb
+++ b/app/helpers/button_helper.rb
@@ -22,6 +22,14 @@ module ButtonHelper
type: :button
end
+ def clipboard_button_with_class(data = {}, css_class: 'btn-clipboard')
+ content_tag :button,
+ icon('clipboard'),
+ class: "btn #{css_class}",
+ data: data,
+ type: :button
+ end
+
def http_clone_button(project)
klass = 'http-selector'
klass << ' has-tooltip' if current_user.try(:require_password?)
diff --git a/app/helpers/commits_helper.rb b/app/helpers/commits_helper.rb
index 767b346f2ff..97d52b1fb9e 100644
--- a/app/helpers/commits_helper.rb
+++ b/app/helpers/commits_helper.rb
@@ -200,7 +200,6 @@ module CommitsHelper
source_email = clean(commit.send "#{options[:source]}_email".to_sym)
person_name = user.try(:name) || source_name
- person_email = user.try(:email) || source_email
text =
if options[:avatar]
diff --git a/app/views/projects/commits/_commit.html.haml b/app/views/projects/commits/_commit.html.haml
index f79c9448f60..d6661deb5ff 100644
--- a/app/views/projects/commits/_commit.html.haml
+++ b/app/views/projects/commits/_commit.html.haml
@@ -19,7 +19,7 @@
.commit-actions
- if commit.status
= render_commit_status(commit, cssclass: 'btn btn-transparent')
- = clipboard_button({ clipboard_text: commit.id }, css_class: 'btn-transparent')
+ = clipboard_button_with_class({ clipboard_text: commit.id }, css_class: 'btn-transparent')
= link_to commit.short_id, namespace_project_commit_path(project.namespace, project, commit), class: "commit-short-id btn btn-transparent"
= link_to_browse_code(project, commit)