summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/nav/top_nav_menu_item_spec.rb
blob: 26f9ea3a63713725148002b0fd7130011fe32070 (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 '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',
        method: 'method',
        view: 'view',
        css_class: 'css_class',
        data: {}
      }

      expect(described_class.build(**item)).to eq(item)
    end
  end
end