Welcome to mirror list, hosted at ThFree Co, Russian Federation.

_sort_dropdown.html.haml_spec.rb « runners « groups « views « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5438fea85eea7c08456b2d9fdeb47d2540aed526 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe 'groups/runners/sort_dropdown.html.haml' do
  describe 'render' do
    describe 'when a sort option is not selected' do
      it 'renders a default sort option' do
        render 'groups/runners/sort_dropdown'

        expect(rendered).to have_content _('Created date')
      end
    end

    describe 'when a sort option is selected' do
      before do
        assign(:sort, 'contacted_asc')
        render 'groups/runners/sort_dropdown'
      end

      it 'renders the selected sort option' do
        expect(rendered).to have_content _('Last Contact')
      end
    end
  end
end