gitlab-org--gitlab-foss/spec/factories
Pierre de La Morinerie 18295585d9 Fix MergeRequest#source_sha when there is no diff
`MergeRequest#source_sha` is expected to return the sha of the source
branch last commit.

But when a open Merge Request has no diff (e.g. all commits have already
been merged to the target branch), `merge_request.source_sha`
incorrectly returns `nil`.

This was un-noticed before – but now that !2217 has been merged,
it makes `Gitlab::Git::Commit.between` raise an
"Unexpected nil argument" exception.

This fixes the crash, by making sure that `source_sha` returns a
correct result even when there is no diff available.
2016-03-16 14:02:04 +01:00
..
ci Move all factory definitions to their own file 2016-03-04 15:26:51 -05:00
abuse_reports.rb Move all factory definitions to their own file 2016-03-04 15:26:51 -05:00
appearances.rb Branded login page also in CE 2016-02-26 15:50:51 +01:00
broadcast_messages.rb Move all factory definitions to their own file 2016-03-04 15:26:51 -05:00
commit_statuses.rb Update commit status factory to reflect recent changes 2016-01-26 15:23:57 +01:00
deploy_keys_projects.rb Move all factory definitions to their own file 2016-03-04 15:26:51 -05:00
emails.rb Remove unused `another_email` factory 2016-03-06 16:34:43 -05:00
events.rb Move all factory definitions to their own file 2016-03-04 15:26:51 -05:00
forked_project_links.rb Move all factory definitions to their own file 2016-03-04 15:26:51 -05:00
group_members.rb Replace project_access attribute with access_level in specs and API 2014-09-15 11:36:50 +03:00
groups.rb Move all factory definitions to their own file 2016-03-04 15:26:51 -05:00
identities.rb Move all factory definitions to their own file 2016-03-04 15:26:51 -05:00
issues.rb Move all factory definitions to their own file 2016-03-04 15:26:51 -05:00
keys.rb Move all factory definitions to their own file 2016-03-04 15:26:51 -05:00
label_links.rb Move all factory definitions to their own file 2016-03-04 15:26:51 -05:00
labels.rb Improving the original label-subscribing implementation 2016-03-15 18:22:02 +01:00
lfs_objects.rb Move all factory definitions to their own file 2016-03-04 15:26:51 -05:00
lfs_objects_projects.rb Move all factory definitions to their own file 2016-03-04 15:26:51 -05:00
merge_requests.rb Fix MergeRequest#source_sha when there is no diff 2016-03-16 14:02:04 +01:00
milestones.rb Move all factory definitions to their own file 2016-03-04 15:26:51 -05:00
namespaces.rb Move all factory definitions to their own file 2016-03-04 15:26:51 -05:00
notes.rb Move all factory definitions to their own file 2016-03-04 15:26:51 -05:00
personal_snippets.rb Simplify the various Snippet factories 2016-03-08 16:40:27 -05:00
project_group_links.rb Bring ProjectGroupLink model and migrations from EE 2016-03-11 17:47:05 +01:00
project_hooks.rb Move all factory definitions to their own file 2016-03-04 15:26:51 -05:00
project_members.rb Add traits for each access_level to ProjectMember factory 2016-03-06 16:53:22 -05:00
project_snippets.rb Simplify the various Snippet factories 2016-03-08 16:40:27 -05:00
projects.rb Annotate models 2016-01-06 13:09:55 +00:00
protected_branches.rb Move all factory definitions to their own file 2016-03-04 15:26:51 -05:00
releases.rb Move all factory definitions to their own file 2016-03-04 15:26:51 -05:00
sent_notifications.rb Move all factory definitions to their own file 2016-03-04 15:26:51 -05:00
service_hooks.rb Move all factory definitions to their own file 2016-03-04 15:26:51 -05:00
services.rb Remove unnecessary attribute definitions from Service factory 2016-03-06 16:55:17 -05:00
snippets.rb Simplify the various Snippet factories 2016-03-08 16:40:27 -05:00
spam_logs.rb Move all factory definitions to their own file 2016-03-04 15:26:51 -05:00
system_hooks.rb Move all factory definitions to their own file 2016-03-04 15:26:51 -05:00
todos.rb Rename Tasks to Todos 2016-02-20 12:39:27 -02:00
users.rb Revert "Merge branch 'avatar-cropping' into 'master' " 2016-03-15 14:55:40 +01:00