gitlab-org--gitlab-foss/spec/models/concerns
Nick Thomas a5a444906d Fix the project auto devops API
If `project_auto_devops.enabled` is nil for a project, when setting any
auto devops values via the API, we try to create a new row in the DB,
instead of re-using the existing one. This leads to the project_id
being set to nil, and the database `NOT NULL` constraint leading to a
500 response.

This commit resolves the issue by correctly detecting the presence of a
ProjectAutoDevops row and re-using it. Persistence is also moved away
from explicit `update!` calls and into relying on `autosave: true` on
the model.
2019-07-19 21:39:26 +00:00
..
token_authenticatable_strategies
access_requestable_spec.rb
avatarable_spec.rb
awardable_spec.rb
batch_destroy_dependent_associations_spec.rb
blob_language_from_git_attributes_spec.rb
blocks_json_serialization_spec.rb
cache_markdown_field_spec.rb
cacheable_attributes_spec.rb
case_sensitivity_spec.rb
chronic_duration_attribute_spec.rb
deployable_spec.rb
deployment_platform_spec.rb Removes clusters_cte feature flag 2019-07-17 20:01:08 +12:00
deprecated_assignee_spec.rb
discussion_on_diff_spec.rb
each_batch_spec.rb
editable_spec.rb
expirable_spec.rb
faster_cache_keys_spec.rb
feature_gate_spec.rb
from_union_spec.rb
group_descendant_spec.rb
has_ref_spec.rb
has_status_spec.rb
has_variable_spec.rb
ignorable_column_spec.rb
issuable_spec.rb CE port for milestones should not be set on epics issue promotion 2019-07-18 18:52:10 +00:00
issuable_states_spec.rb
loaded_in_group_list_spec.rb
manual_inverse_association_spec.rb
maskable_spec.rb
mentionable_spec.rb
milestoneish_spec.rb
noteable_spec.rb
optionally_search_spec.rb
participable_spec.rb
presentable_spec.rb
project_api_compatibility_spec.rb Fix the project auto devops API 2019-07-19 21:39:26 +00:00
project_features_compatibility_spec.rb
prometheus_adapter_spec.rb
protected_ref_access_spec.rb
reactive_caching_spec.rb
redactable_spec.rb
redis_cacheable_spec.rb
relative_positioning_spec.rb
resolvable_discussion_spec.rb
resolvable_note_spec.rb
routable_spec.rb
sha_attribute_spec.rb
sortable_spec.rb
spammable_spec.rb
stepable_spec.rb Don't use transactions and exceptions 2019-07-16 19:20:43 +00:00
strip_attribute_spec.rb
subscribable_spec.rb
token_authenticatable_spec.rb
triggerable_hooks_spec.rb
uniquify_spec.rb