diff options
Diffstat (limited to 'spec/services/ml/experiment_tracking/candidate_repository_spec.rb')
-rw-r--r-- | spec/services/ml/experiment_tracking/candidate_repository_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/services/ml/experiment_tracking/candidate_repository_spec.rb b/spec/services/ml/experiment_tracking/candidate_repository_spec.rb index 079c36c9613..9b46675a08e 100644 --- a/spec/services/ml/experiment_tracking/candidate_repository_spec.rb +++ b/spec/services/ml/experiment_tracking/candidate_repository_spec.rb @@ -61,6 +61,15 @@ RSpec.describe ::Ml::ExperimentTracking::CandidateRepository, feature_category: expect(subject.name).to eq('blah') end end + + context 'when name is nil and no mlflow.runName is not present' do + let(:tags) { nil } + let(:name) { nil } + + it 'gives the candidate a random name' do + expect(subject.name).to match(/[a-z]+-[a-z]+-[a-z]+-\d+/) + end + end end end |