Commit 642bf454 authored by Marin Jankovski's avatar Marin Jankovski

Merge branch 'ce_upstream' into 'master'

Update to CE commit 777771

This ensures both CE and EE have the same code in the master branch for the RC release.

See merge request !113
parents 5dbf246d 5c32336f
...@@ -251,7 +251,7 @@ group :development, :test do ...@@ -251,7 +251,7 @@ group :development, :test do
gem 'byebug', platform: :mri gem 'byebug', platform: :mri
gem 'pry-rails' gem 'pry-rails'
gem 'awesome_print', '~> 1.2.0' gem 'awesome_print', '~> 1.2.0', require: false
gem 'fuubar', '~> 2.0.0' gem 'fuubar', '~> 2.0.0'
gem 'database_cleaner', '~> 1.4.0' gem 'database_cleaner', '~> 1.4.0'
......
...@@ -16,12 +16,16 @@ class @Issue ...@@ -16,12 +16,16 @@ class @Issue
$(document).on 'tasklist:changed', '.detail-page-description .js-task-list-container', @updateTaskList $(document).on 'tasklist:changed', '.detail-page-description .js-task-list-container', @updateTaskList
initIssueBtnEventListeners: -> initIssueBtnEventListeners: ->
_this = @
issueFailMessage = 'Unable to update this issue at this time.' issueFailMessage = 'Unable to update this issue at this time.'
$('a.btn-close, a.btn-reopen').on 'click', (e) -> $('a.btn-close, a.btn-reopen').on 'click', (e) ->
e.preventDefault() e.preventDefault()
e.stopImmediatePropagation() e.stopImmediatePropagation()
$this = $(this) $this = $(this)
isClose = $this.hasClass('btn-close') isClose = $this.hasClass('btn-close')
shouldSubmit = $this.hasClass('btn-comment')
if shouldSubmit
_this.submitNoteForm($this.closest('form'))
$this.prop('disabled', true) $this.prop('disabled', true)
url = $this.attr('href') url = $this.attr('href')
$.ajax $.ajax
...@@ -32,12 +36,13 @@ class @Issue ...@@ -32,12 +36,13 @@ class @Issue
new Flash(issueFailMessage, 'alert') new Flash(issueFailMessage, 'alert')
success: (data, textStatus, jqXHR) -> success: (data, textStatus, jqXHR) ->
if data.saved if data.saved
$this.addClass('hidden')
if isClose if isClose
$('a.btn-close').addClass('hidden')
$('a.btn-reopen').removeClass('hidden') $('a.btn-reopen').removeClass('hidden')
$('div.status-box-closed').removeClass('hidden') $('div.status-box-closed').removeClass('hidden')
$('div.status-box-open').addClass('hidden') $('div.status-box-open').addClass('hidden')
else else
$('a.btn-reopen').addClass('hidden')
$('a.btn-close').removeClass('hidden') $('a.btn-close').removeClass('hidden')
$('div.status-box-closed').addClass('hidden') $('div.status-box-closed').addClass('hidden')
$('div.status-box-open').removeClass('hidden') $('div.status-box-open').removeClass('hidden')
...@@ -45,6 +50,11 @@ class @Issue ...@@ -45,6 +50,11 @@ class @Issue
new Flash(issueFailMessage, 'alert') new Flash(issueFailMessage, 'alert')
$this.prop('disabled', false) $this.prop('disabled', false)
submitNoteForm: (form) =>
noteText = form.find("textarea.js-note-text").val()
if noteText.trim().length > 0
form.submit()
disableTaskList: -> disableTaskList: ->
$('.detail-page-description .js-task-list-container').taskList('disable') $('.detail-page-description .js-task-list-container').taskList('disable')
$(document).off 'tasklist:changed', '.detail-page-description .js-task-list-container' $(document).off 'tasklist:changed', '.detail-page-description .js-task-list-container'
......
...@@ -19,6 +19,7 @@ class @MergeRequest ...@@ -19,6 +19,7 @@ class @MergeRequest
# Prevent duplicate event bindings # Prevent duplicate event bindings
@disableTaskList() @disableTaskList()
@initMRBtnListeners()
if $("a.btn-close").length if $("a.btn-close").length
@initTaskList() @initTaskList()
...@@ -43,6 +44,27 @@ class @MergeRequest ...@@ -43,6 +44,27 @@ class @MergeRequest
$('.detail-page-description .js-task-list-container').taskList('enable') $('.detail-page-description .js-task-list-container').taskList('enable')
$(document).on 'tasklist:changed', '.detail-page-description .js-task-list-container', @updateTaskList $(document).on 'tasklist:changed', '.detail-page-description .js-task-list-container', @updateTaskList
initMRBtnListeners: ->
_this = @
$('a.btn-close, a.btn-reopen').on 'click', (e) ->
$this = $(this)
if $this.data('submitted')
return
e.preventDefault()
e.stopImmediatePropagation()
shouldSubmit = $this.hasClass('btn-comment')
console.log("shouldSubmit")
if shouldSubmit
_this.submitNoteForm($this.closest('form'),$this)
submitNoteForm: (form, $button) =>
noteText = form.find("textarea.js-note-text").val()
if noteText.trim().length > 0
form.submit()
$button.data('submitted',true)
$button.trigger('click')
disableTaskList: -> disableTaskList: ->
$('.detail-page-description .js-task-list-container').taskList('disable') $('.detail-page-description .js-task-list-container').taskList('disable')
$(document).off 'tasklist:changed', '.detail-page-description .js-task-list-container' $(document).off 'tasklist:changed', '.detail-page-description .js-task-list-container'
......
...@@ -33,8 +33,6 @@ class @Notes ...@@ -33,8 +33,6 @@ class @Notes
$(document).on "click", ".note-edit-cancel", @cancelEdit $(document).on "click", ".note-edit-cancel", @cancelEdit
# Reopen and close actions for Issue/MR combined with note form submit # Reopen and close actions for Issue/MR combined with note form submit
$(document).on "click", ".js-note-target-reopen", @targetReopen
$(document).on "click", ".js-note-target-close", @targetClose
$(document).on "click", ".js-comment-button", @updateCloseButton $(document).on "click", ".js-comment-button", @updateCloseButton
$(document).on "keyup", ".js-note-text", @updateTargetButtons $(document).on "keyup", ".js-note-text", @updateTargetButtons
...@@ -512,17 +510,6 @@ class @Notes ...@@ -512,17 +510,6 @@ class @Notes
visibilityChange: => visibilityChange: =>
@refresh() @refresh()
targetReopen: (e) =>
@submitNoteForm($(e.target).parents('form'))
targetClose: (e) =>
@submitNoteForm($(e.target).parents('form'))
submitNoteForm: (form) =>
noteText = form.find(".js-note-text").val()
if noteText.trim().length > 0
form.submit()
updateCloseButton: (e) => updateCloseButton: (e) =>
textarea = $(e.target) textarea = $(e.target)
form = textarea.parents('form') form = textarea.parents('form')
...@@ -531,7 +518,6 @@ class @Notes ...@@ -531,7 +518,6 @@ class @Notes
updateTargetButtons: (e) => updateTargetButtons: (e) =>
textarea = $(e.target) textarea = $(e.target)
form = textarea.parents('form') form = textarea.parents('form')
if textarea.val().trim().length > 0 if textarea.val().trim().length > 0
form.find('.js-note-target-reopen').text('Comment & reopen') form.find('.js-note-target-reopen').text('Comment & reopen')
form.find('.js-note-target-close').text('Comment & close') form.find('.js-note-target-close').text('Comment & close')
......
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
/** light list with border-bottom between li **/ /** light list with border-bottom between li **/
ul.bordered-list { ul.bordered-list, ul.unstyled-list {
@include basic-list; @include basic-list;
&.top-list { &.top-list {
...@@ -88,6 +88,10 @@ ul.bordered-list { ...@@ -88,6 +88,10 @@ ul.bordered-list {
} }
} }
ul.unstyled-list > li {
border-bottom: none;
}
ul.task-list { ul.task-list {
li.task-list-item { li.task-list-item {
list-style-type: none; list-style-type: none;
......
...@@ -24,6 +24,7 @@ $gl-gray: #5a5a5a; ...@@ -24,6 +24,7 @@ $gl-gray: #5a5a5a;
$gl-padding: 16px; $gl-padding: 16px;
$gl-padding-top:10px; $gl-padding-top:10px;
$gl-avatar-size: 46px; $gl-avatar-size: 46px;
$secondary-text: #7f8fa4;
/* /*
* Color schema * Color schema
......
...@@ -144,3 +144,8 @@ form.edit-issue { ...@@ -144,3 +144,8 @@ form.edit-issue {
.issue-form .select2-container { .issue-form .select2-container {
width: 250px !important; width: 250px !important;
} }
.issue-closed-by-widget {
color: $secondary-text;
margin-left: 52px;
}
\ No newline at end of file
...@@ -6,11 +6,9 @@ class Admin::AbuseReportsController < Admin::ApplicationController ...@@ -6,11 +6,9 @@ class Admin::AbuseReportsController < Admin::ApplicationController
def destroy def destroy
abuse_report = AbuseReport.find(params[:id]) abuse_report = AbuseReport.find(params[:id])
if params[:remove_user] abuse_report.remove_user if params[:remove_user]
abuse_report.user.destroy
end
abuse_report.destroy abuse_report.destroy
render nothing: true render nothing: true
end end
end end
...@@ -19,6 +19,11 @@ class AbuseReport < ActiveRecord::Base ...@@ -19,6 +19,11 @@ class AbuseReport < ActiveRecord::Base
validates :message, presence: true validates :message, presence: true
validates :user_id, uniqueness: true validates :user_id, uniqueness: true
def remove_user
user.block
user.destroy
end
def notify def notify
return unless self.persisted? return unless self.persisted?
......
...@@ -73,9 +73,10 @@ class IrkerService < Service ...@@ -73,9 +73,10 @@ class IrkerService < Service
'irc[s]://irc.network.net[:port]/#channel. Special cases: if '\ 'irc[s]://irc.network.net[:port]/#channel. Special cases: if '\
'you want the channel to be a nickname instead, append ",isnick" to ' \ 'you want the channel to be a nickname instead, append ",isnick" to ' \
'the channel name; if the channel is protected by a secret password, ' \ 'the channel name; if the channel is protected by a secret password, ' \
' append "?key=secretpassword" to the URI. Note that if you specify a ' \ ' append "?key=secretpassword" to the URI (Note that due to a bug, if you ' \
' default IRC URI to prepend before each recipient, you can just give ' \ ' want to use a password, you have to omit the "#" on the channel). If you ' \
' a channel name.' }, ' specify a default IRC URI to prepend before each recipient, you can just ' \
' give a channel name.' },
{ type: 'checkbox', name: 'colorize_messages' }, { type: 'checkbox', name: 'colorize_messages' },
] ]
end end
......
...@@ -47,7 +47,8 @@ class SystemHooksService ...@@ -47,7 +47,8 @@ class SystemHooksService
data.merge!({ data.merge!({
name: model.name, name: model.name,
email: model.email, email: model.email,
user_id: model.id user_id: model.id,
username: model.username
}) })
when ProjectMember when ProjectMember
data.merge!(project_member_data(model)) data.merge!(project_member_data(model))
...@@ -99,8 +100,10 @@ class SystemHooksService ...@@ -99,8 +100,10 @@ class SystemHooksService
project_path: model.project.path, project_path: model.project.path,
project_path_with_namespace: model.project.path_with_namespace, project_path_with_namespace: model.project.path_with_namespace,
project_id: model.project.id, project_id: model.project.id,
user_username: model.user.username,
user_name: model.user.name, user_name: model.user.name,
user_email: model.user.email, user_email: model.user.email,
user_id: model.user.id,
access_level: model.human_access, access_level: model.human_access,
project_visibility: Project.visibility_levels.key(model.project.visibility_level_field).downcase project_visibility: Project.visibility_levels.key(model.project.visibility_level_field).downcase
} }
...@@ -111,6 +114,7 @@ class SystemHooksService ...@@ -111,6 +114,7 @@ class SystemHooksService
group_name: model.group.name, group_name: model.group.name,
group_path: model.group.path, group_path: model.group.path,
group_id: model.group.id, group_id: model.group.id,
user_username: model.user.username,
user_name: model.user.name, user_name: model.user.name,
user_email: model.user.email, user_email: model.user.email,
user_id: model.user.id, user_id: model.user.id,
......
.issue-closed-by-widget.gray-content-block.second-block.white .issue-closed-by-widget.second-block
This issue will be closed automatically when merge request #{markdown(merge_requests_sentence(@closed_by_merge_requests), pipeline: :gfm)} is accepted. - pluralized_mr_this = merge_request_count > 1 ? "these" : "this"
- pluralized_mr_is = merge_request_count > 1 ? "are" : "is"
When #{pluralized_mr_this} merge #{"request".pluralize(merge_request_count)} #{pluralized_mr_is} accepted, this issue will be closed automatically.
- content_for :note_actions do - content_for :note_actions do
- if can?(current_user, :update_issue, @issue) - if can?(current_user, :update_issue, @issue)
- if @issue.closed? = link_to 'Reopen Issue', issue_path(@issue, issue: {state_event: :reopen}, status_only: true, format: 'json'), data: {no_turbolink: true}, class: "btn btn-nr btn-grouped btn-reopen btn-comment js-note-target-reopen #{issue_button_visibility(@issue, false)}", title: 'Reopen Issue'
= link_to 'Reopen Issue', issue_path(@issue, issue: {state_event: :reopen}, status_only: true), method: :put, class: 'btn btn-nr btn-grouped btn-reopen js-note-target-reopen', title: 'Reopen Issue' = link_to 'Close Issue', issue_path(@issue, issue: {state_event: :close}, status_only: true, format: 'json'), data: {no_turbolink: true}, class: "btn btn-nr btn-grouped btn-close btn-comment js-note-target-close #{issue_button_visibility(@issue, true)}", title: 'Close Issue'
- else
= link_to 'Close Issue', issue_path(@issue, issue: {state_event: :close}, status_only: true), method: :put, class: 'btn btn-nr btn-grouped btn-close js-note-target-close', title: 'Close Issue'
#notes #notes
= render 'projects/notes/notes_with_form' = render 'projects/notes/notes_with_form'
-if @merge_requests.any? -if @merge_requests.any?
%h2.merge-requests-title %h2.merge-requests-title
= pluralize(@merge_requests.count, 'Related Merge Request') = pluralize(@merge_requests.count, 'Related Merge Request')
%ul.bordered-list %ul.unstyled-list
- has_any_ci = @merge_requests.any?(&:ci_commit) - has_any_ci = @merge_requests.any?(&:ci_commit)
- @merge_requests.each do |merge_request| - @merge_requests.each do |merge_request|
%li %li
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
- elsif has_any_ci - elsif has_any_ci
= icon('blank fw') = icon('blank fw')
%span.merge-request-id %span.merge-request-id
\##{merge_request.iid} \!#{merge_request.iid}
%span.merge-request-info %span.merge-request-info
%strong %strong
= link_to_gfm merge_request.title, merge_request_path(merge_request), class: "row_title" = link_to_gfm merge_request.title, merge_request_path(merge_request), class: "row_title"
...@@ -24,3 +24,5 @@ ...@@ -24,3 +24,5 @@
MERGED MERGED
- elsif merge_request.closed? - elsif merge_request.closed?
CLOSED CLOSED
- if @closed_by_merge_requests.present?
= render partial: 'projects/issues/closed_by_box', locals: {merge_request_count: @merge_requests.count}
...@@ -53,9 +53,6 @@ ...@@ -53,9 +53,6 @@
.gray-content-block.second-block.oneline-block .gray-content-block.second-block.oneline-block
= render 'votes/votes_block', votable: @issue = render 'votes/votes_block', votable: @issue
- if @closed_by_merge_requests.present?
= render 'projects/issues/closed_by_box'
.row .row
%section.col-md-9 %section.col-md-9
.issuable-discussion .issuable-discussion
......
- content_for :note_actions do - content_for :note_actions do
- if can?(current_user, :update_merge_request, @merge_request) - if can?(current_user, :update_merge_request, @merge_request)
- if @merge_request.open? - if @merge_request.open?
= link_to 'Close', merge_request_path(@merge_request, merge_request: {state_event: :close }), method: :put, class: "btn btn-nr btn-grouped btn-close close-mr-link js-note-target-close", title: "Close merge request" = link_to 'Close', merge_request_path(@merge_request, merge_request: {state_event: :close }), method: :put, class: "btn btn-nr btn-comment btn-grouped btn-close close-mr-link js-note-target-close", title: "Close merge request"
- if @merge_request.closed? - if @merge_request.closed?
= link_to 'Reopen', merge_request_path(@merge_request, merge_request: {state_event: :reopen }), method: :put, class: "btn btn-nr btn-grouped btn-reopen reopen-mr-link js-note-target-reopen", title: "Reopen merge request" = link_to 'Reopen', merge_request_path(@merge_request, merge_request: {state_event: :reopen }), method: :put, class: "btn btn-nr btn-comment btn-grouped btn-reopen reopen-mr-link js-note-target-reopen", title: "Reopen merge request"
#notes= render "projects/notes/notes_with_form" #notes= render "projects/notes/notes_with_form"
...@@ -96,6 +96,7 @@ X-Gitlab-Event: System Hook ...@@ -96,6 +96,7 @@ X-Gitlab-Event: System Hook
"project_path_with_namespace": "jsmith/storecloud", "project_path_with_namespace": "jsmith/storecloud",
"user_email": "johnsmith@gmail.com", "user_email": "johnsmith@gmail.com",
"user_name": "John Smith", "user_name": "John Smith",
"user_username": "johnsmith",
"user_id": 41, "user_id": 41,
"project_visibility": "private", "project_visibility": "private",
} }
...@@ -115,6 +116,7 @@ X-Gitlab-Event: System Hook ...@@ -115,6 +116,7 @@ X-Gitlab-Event: System Hook
"project_path_with_namespace": "jsmith/storecloud", "project_path_with_namespace": "jsmith/storecloud",
"user_email": "johnsmith@gmail.com", "user_email": "johnsmith@gmail.com",
"user_name": "John Smith", "user_name": "John Smith",
"user_username": "johnsmith",
"user_id": 41, "user_id": 41,
"project_visibility": "private", "project_visibility": "private",
} }
...@@ -129,6 +131,7 @@ X-Gitlab-Event: System Hook ...@@ -129,6 +131,7 @@ X-Gitlab-Event: System Hook
"email": "js@gitlabhq.com", "email": "js@gitlabhq.com",
"event_name": "user_create", "event_name": "user_create",
"name": "John Smith", "name": "John Smith",
"username": "js",
"user_id": 41 "user_id": 41
} }
``` ```
...@@ -142,6 +145,7 @@ X-Gitlab-Event: System Hook ...@@ -142,6 +145,7 @@ X-Gitlab-Event: System Hook
"email": "js@gitlabhq.com", "email": "js@gitlabhq.com",
"event_name": "user_destroy", "event_name": "user_destroy",
"name": "John Smith", "name": "John Smith",
"username": "js",
"user_id": 41 "user_id": 41
} }
``` ```
...@@ -215,6 +219,7 @@ X-Gitlab-Event: System Hook ...@@ -215,6 +219,7 @@ X-Gitlab-Event: System Hook
"group_path": "storecloud", "group_path": "storecloud",
"user_email": "johnsmith@gmail.com", "user_email": "johnsmith@gmail.com",
"user_name": "John Smith", "user_name": "John Smith",
"user_username": "johnsmith",
"user_id": 41 "user_id": 41
} }
``` ```
...@@ -231,6 +236,7 @@ X-Gitlab-Event: System Hook ...@@ -231,6 +236,7 @@ X-Gitlab-Event: System Hook
"group_path": "storecloud", "group_path": "storecloud",
"user_email": "johnsmith@gmail.com", "user_email": "johnsmith@gmail.com",
"user_name": "John Smith", "user_name": "John Smith",
"user_username": "johnsmith",
"user_id": 41 "user_id": 41
} }
``` ```
...@@ -2,6 +2,8 @@ module Gitlab ...@@ -2,6 +2,8 @@ module Gitlab
class TaskAbortedByUserError < StandardError; end class TaskAbortedByUserError < StandardError; end
end end
String.disable_colorization = true unless STDOUT.isatty
namespace :gitlab do namespace :gitlab do
# Ask if the user wants to continue # Ask if the user wants to continue
......
...@@ -44,7 +44,7 @@ describe 'reopen/close issue', -> ...@@ -44,7 +44,7 @@ describe 'reopen/close issue', ->
expect($('div.status-box-closed')).toBeVisible() expect($('div.status-box-closed')).toBeVisible()
expect($('div.status-box-open')).toBeHidden() expect($('div.status-box-open')).toBeHidden()
it 'fails to closes an issue with success:false', -> it 'fails to close an issue with success:false', ->
spyOn(jQuery, 'ajax').and.callFake (req) -> spyOn(jQuery, 'ajax').and.callFake (req) ->
expect(req.type).toBe('PUT') expect(req.type).toBe('PUT')
......
...@@ -29,6 +29,22 @@ RSpec.describe AbuseReport, type: :model do ...@@ -29,6 +29,22 @@ RSpec.describe AbuseReport, type: :model do
it { is_expected.to validate_uniqueness_of(:user_id) } it { is_expected.to validate_uniqueness_of(:user_id) }
end end
describe '#remove_user' do
it 'blocks the user' do
report = build(:abuse_report)
allow(report.user).to receive(:destroy)
expect { report.remove_user }.to change { report.user.blocked? }.to(true)
end
it 'removes the user' do
report = build(:abuse_report)
expect { report.remove_user }.to change { User.count }.by(-1)
end
end
describe '#notify' do describe '#notify' do
it 'delivers' do it 'delivers' do
expect(AbuseReportMailer).to receive(:notify).with(subject.id). expect(AbuseReportMailer).to receive(:notify).with(subject.id).
......
...@@ -9,54 +9,54 @@ describe SystemHooksService, services: true do ...@@ -9,54 +9,54 @@ describe SystemHooksService, services: true do
let(:group_member) { create(:group_member) } let(:group_member) { create(:group_member) }
context 'event data' do context 'event data' do
it { expect(event_data(user, :create)).to include(:event_name, :name, :created_at, :updated_at, :email, :user_id) } it { expect(event_data(user, :create)).to include(:event_name, :name, :created_at, :updated_at, :email, :user_id, :username) }
it { expect(event_data(user, :destroy)).to include(:event_name, :name, :created_at, :updated_at, :email, :user_id) } it { expect(event_data(user, :destroy)).to include(:event_name, :name, :created_at, :updated_at, :email, :user_id, :username) }
it { expect(event_data(project, :create)).to include(:event_name, :name, :created_at, :updated_at, :path, :project_id, :owner_name, :owner_email, :project_visibility) } it { expect(event_data(project, :create)).to include(:event_name, :name, :created_at, :updated_at, :path, :project_id, :owner_name, :owner_email, :project_visibility) }
it { expect(event_data(project, :destroy)).to include(:event_name, :name, :created_at, :updated_at, :path, :project_id, :owner_name, :owner_email, :project_visibility) } it { expect(event_data(project, :destroy)).to include(:event_name, :name, :created_at, :updated_at, :path, :project_id, :owner_name, :owner_email, :project_visibility) }
it { expect(event_data(project_member, :create)).to include(:event_name, :created_at, :updated_at, :project_name, :project_path, :project_path_with_namespace, :project_id, :user_name, :user_email, :access_level, :project_visibility) } it { expect(event_data(project_member, :create)).to include(:event_name, :created_at, :updated_at, :project_name, :project_path, :project_path_with_namespace, :project_id, :user_name, :user_username, :user_email, :user_id, :access_level, :project_visibility) }
it { expect(event_data(project_member, :destroy)).to include(:event_name, :created_at, :updated_at, :project_name, :project_path, :project_path_with_namespace, :project_id, :user_name, :user_email, :access_level, :project_visibility) } it { expect(event_data(project_member, :destroy)).to include(:event_name, :created_at, :updated_at, :project_name, :project_path, :project_path_with_namespace, :project_id, :user_name, :user_username, :user_email, :user_id, :access_level, :project_visibility) }
it { expect(event_data(key, :create)).to include(:username, :key, :id) } it { expect(event_data(key, :create)).to include(:username, :key, :id) }
it { expect(event_data(key, :destroy)).to include(:username, :key, :id) } it { expect(event_data(key, :destroy)).to include(:username, :key, :id) }
it do it do
project.old_path_with_namespace = 'renamed_from_path' project.old_path_with_namespace = 'renamed_from_path'
expect(event_data(project, :rename)).to include( expect(event_data(project, :rename)).to include(
:event_name, :name, :created_at, :updated_at, :path, :project_id, :event_name, :name, :created_at, :updated_at, :path, :project_id,
:owner_name, :owner_email, :project_visibility, :owner_name, :owner_email, :project_visibility,
:old_path_with_namespace :old_path_with_namespace
) )
end end
it do it do
project.old_path_with_namespace = 'transfered_from_path' project.old_path_with_namespace = 'transfered_from_path'
expect(event_data(project, :transfer)).to include( expect(event_data(project, :transfer)).to include(
:event_name, :name, :created_at, :updated_at, :path, :project_id, :event_name, :name, :created_at, :updated_at, :path, :project_id,
:owner_name, :owner_email, :project_visibility, :owner_name, :owner_email, :project_visibility,
:old_path_with_namespace :old_path_with_namespace
) )
end end
it do it do
expect(event_data(group, :create)).to include( expect(event_data(group, :create)).to include(
:event_name, :name, :created_at, :updated_at, :path, :group_id, :event_name, :name, :created_at, :updated_at, :path, :group_id,
:owner_name, :owner_email :owner_name, :owner_email
) )
end end
it do it do
expect(event_data(group, :destroy)).to include( expect(event_data(group, :destroy)).to include(
:event_name, :name, :created_at, :updated_at, :path, :group_id, :event_name, :name, :created_at, :updated_at, :path, :group_id,
:owner_name, :owner_email :owner_name, :owner_email
) )
end end
it do it do
expect(event_data(group_member, :create)).to include( expect(event_data(group_member, :create)).to include(
:event_name, :created_at, :updated_at, :group_name, :group_path, :event_name, :created_at, :updated_at, :group_name, :group_path,
:group_id, :user_id, :user_name, :user_email, :group_access :group_id, :user_id, :user_username, :user_name, :user_email, :group_access
) )
end end
it do it do
expect(event_data(group_member, :destroy)).to include( expect(event_data(group_member, :destroy)).to include(
:event_name, :created_at, :updated_at, :group_name, :group_path, :event_name, :created_at, :updated_at, :group_name, :group_path,
:group_id, :user_id, :user_name, :user_email, :group_access :group_id, :user_id, :user_username, :user_name, :user_email, :group_access
) )
end end
end end
......
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