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

top_nav_menu_item_spec.rb « nav « gitlab « lib « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d1d6ac80c4019b45bf4676e5c0917c9732e3af1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# frozen_string_literal: true

require 'fast_spec_helper'

RSpec.describe ::Gitlab::Nav::TopNavMenuItem do
  describe '.build' do
    it 'builds a hash from the given args' do
      item = {
        id: 'id',
        title: 'Title',
        active: true,
        icon: 'icon',
        href: 'href',
        view: 'view',
        css_class: 'css_class',
        data: {},
        emoji: 'smile'
      }

      expect(described_class.build(**item)).to eq(item.merge(type: :item))
    end
  end
end