Commit 1c6aa5c7 authored by Fatih Acet's avatar Fatih Acet

MRWidget: Fix approvals related specs.

parent dc9474fb
......@@ -19,6 +19,11 @@ export default {
isMakingRequest: false,
};
},
computed: {
isApprovalsLeft() {
return this.mr.approvals && this.mr.approvalsLeft;
},
},
methods: {
rebase() {
this.isMakingRequest = true;
......@@ -82,7 +87,7 @@ export default {
<div class="accept-merge-holder clearfix js-toggle-container accept-action">
<button
class="btn btn-small btn-reopen btn-success"
:disabled="mr.approvalsLeft || isMakingRequest"
:disabled="isApprovalsLeft || isMakingRequest"
@click="rebase">
<i
v-if="isMakingRequest"
......@@ -98,7 +103,7 @@ export default {
</div>
<div class="mr-info-list">
<div class="legend"></div>
<p v-if="mr.approvalsLeft">
<p v-if="isApprovalsLeft">
Rebasing is disabled until merge request has been approved.
</p>
</div>
......
......@@ -51,7 +51,6 @@ describe MergeRequestEntity do
## EE
:can_push_to_source_branch, :approvals_before_merge,
:squash, :rebase_commit_sha, :rebase_in_progress,
:approved, :should_be_rebased, :rebase_path,
:approvals_path, :ff_only_enabled)
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