Sha256: c47ceef13967d7d0917b7a53a8d633084ae0476a6cf3dce49b7624269cfdeb2b

Contents?: true

Size: 649 Bytes

Versions: 45

Compression:

Stored size: 649 Bytes

Contents

require 'rails_helper'

describe Navbar do
  let(:user) { create :user }
  let(:instancia) { described_class.new }

  before do
    Current.user = user
  end

  describe '#add_html' do
    subject { instancia.add_html(some_html) }

    let(:some_html) { '<p>Hola</p>' }

    it do
      expect { subject }.to(change(instancia, :extensiones))
    end
  end

  describe '#add_item' do
    subject { instancia.add_item('key', some_item) }

    let(:some_item) do
      {
        name: 'Título',
        path: 'root_path',
        policy: 'true'
      }
    end

    it do
      expect { subject }.to(change { instancia.bar('key') })
    end
  end
end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
pg_rails-7.6.27 pg_layout/spec/lib/navbar_spec.rb
pg_rails-7.6.26 pg_layout/spec/lib/navbar_spec.rb
pg_rails-7.6.25 pg_layout/spec/lib/navbar_spec.rb
pg_rails-7.6.24 pg_layout/spec/lib/navbar_spec.rb
pg_rails-7.6.24.pre.5 pg_layout/spec/lib/navbar_spec.rb
pg_rails-7.6.24.pre.4 pg_layout/spec/lib/navbar_spec.rb
pg_rails-7.6.24.pre.3 pg_layout/spec/lib/navbar_spec.rb
pg_rails-7.6.23 pg_layout/spec/lib/navbar_spec.rb
pg_rails-7.6.22 pg_layout/spec/lib/navbar_spec.rb
pg_rails-7.6.22.pre.3 pg_layout/spec/lib/navbar_spec.rb
pg_rails-7.6.22.pre.2 pg_layout/spec/lib/navbar_spec.rb
pg_rails-7.6.22.pre.1 pg_layout/spec/lib/navbar_spec.rb
pg_rails-7.6.21 pg_layout/spec/lib/navbar_spec.rb
pg_rails-7.6.21.pre.11 pg_layout/spec/lib/navbar_spec.rb
pg_rails-7.6.21.pre.10 pg_layout/spec/lib/navbar_spec.rb
pg_rails-7.6.21.pre.9 pg_layout/spec/lib/navbar_spec.rb
pg_rails-7.6.21.pre.8 pg_layout/spec/lib/navbar_spec.rb
pg_rails-7.6.21.pre.7 pg_layout/spec/lib/navbar_spec.rb
pg_rails-7.6.21.pre.6 pg_layout/spec/lib/navbar_spec.rb
pg_rails-7.6.21.pre.5 pg_layout/spec/lib/navbar_spec.rb