summaryrefslogtreecommitdiff
path: root/spec/models/airflow/dags_spec.rb
blob: ff3c45227794ec7c92e0fc0316e46dc26057971e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe Airflow::Dags, feature_category: :dataops do
  describe 'associations' do
    it { is_expected.to belong_to(:project) }
  end

  describe 'validations' do
    it { is_expected.to validate_presence_of(:project) }
    it { is_expected.to validate_presence_of(:dag_name) }
    it { is_expected.to validate_length_of(:dag_name).is_at_most(255) }
    it { is_expected.to validate_length_of(:schedule).is_at_most(255) }
    it { is_expected.to validate_length_of(:fileloc).is_at_most(255) }
  end
end