diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-07-28 19:26:16 -0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-08-17 12:58:57 -0300 |
commit | b07c5f23b8761ae87d29ded1a69b14ae6393443a (patch) | |
tree | ec6d9812ae818c282480ef930c971462a203560f /spec/models/list_spec.rb | |
parent | 35420cec0bf511af662e09cbd8664720c58fa187 (diff) | |
download | gitlab-ce-b07c5f23b8761ae87d29ded1a69b14ae6393443a.tar.gz |
Order board lists by list_type, and position
Diffstat (limited to 'spec/models/list_spec.rb')
-rw-r--r-- | spec/models/list_spec.rb | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/spec/models/list_spec.rb b/spec/models/list_spec.rb index 7ad32047cb7..60b46f06195 100644 --- a/spec/models/list_spec.rb +++ b/spec/models/list_spec.rb @@ -13,16 +13,18 @@ describe List do it { is_expected.to validate_presence_of(:position) } it { is_expected.to validate_numericality_of(:position).only_integer.is_greater_than_or_equal_to(0) } - it 'does not require label to be set when list_type is set to backlog' do - subject.list_type = :backlog + context 'when list_type is set to backlog' do + subject { described_class.new(list_type: :backlog) } - expect(subject).not_to validate_presence_of(:label) + it { is_expected.not_to validate_presence_of(:label) } + it { is_expected.not_to validate_presence_of(:position) } end - it 'does not require label to be set when list_type is set to done' do - subject.list_type = :done + context 'when list_type is set to done' do + subject { described_class.new(list_type: :done) } - expect(subject).not_to validate_presence_of(:label) + it { is_expected.not_to validate_presence_of(:label) } + it { is_expected.not_to validate_presence_of(:position) } end end end |