gitlab-org--gitlab-foss/spec
Jacob Schatz 7b18e8c744 Merge branch '13525-sane-defaults-for-merge-request-js-class-constructor' into 'master'
Avoid a TypeError when initializing MergeRequest JS class with no arg

## What does this MR do?

Avoid a TypeError when initializing MergeRequest JS class with no arg.

## Are there points in the code the reviewer needs to double check?

No.

## Why was this MR needed?

Without this sane default you would get the following error when you
tried to instantiate a new MergeRequest object with no argument (i.e.
`new MergeRequest();`):
    
    TypeError: undefined is not an object (evaluating 'this.opts.action')

## What are the relevant issue numbers?

Fixes #13525.

## Does this MR meet the acceptance criteria?

- [x] No CHANGELOG since it's a trivial internal change
- [x] Tests
  - [x] Added for this feature/bug
  - [ ] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

See merge request !4667
2016-06-16 18:32:23 +00:00
..
config
controllers Merge branch 'stanhu/gitlab-ce-fix-error-500-false-binary-negative' 2016-06-15 15:56:02 +02:00
factories Improve validations 2016-06-15 12:03:49 +02:00
features Merge branch 'template_dropdown' into 'master' 2016-06-16 17:29:45 +00:00
finders Fix notes on confidential issues through JSON to users without access 2016-06-14 17:51:17 -03:00
fixtures Add support for Docker Registry manifest v1 2016-06-15 12:53:23 +02:00
helpers Fix permission checks in member row 2016-06-15 18:17:45 +02:00
initializers
javascripts Merge branch '13525-sane-defaults-for-merge-request-js-class-constructor' into 'master' 2016-06-16 18:32:23 +00:00
lib Banzai::Filter::ExternalLinkFilter use XPath 2016-06-16 14:13:29 +02:00
mailers UI and copywriting improvements 2016-06-14 13:18:14 +02:00
models Merge branch 'fix/status-of-pipeline-without-builds' into 'master' 2016-06-16 11:48:36 +00:00
requests Merge branch '18451-track-new-redis-connections' into 'master' 2016-06-15 09:56:42 +00:00
routing
services Merge branch 'fix/status-of-pipeline-without-builds' into 'master' 2016-06-16 11:48:36 +00:00
support
tasks/gitlab
views
workers Merge branch 'dont-drop-stuck-builds' into 'master' 2016-06-15 02:54:19 +00:00
factories_spec.rb
rails_helper.rb
spec_helper.rb
teaspoon_env.rb