Skip to content

Commit

Permalink
Issue #81. Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kalashnikovisme committed Nov 20, 2024
1 parent 69c70f5 commit 8f975be
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion spec/decorators/base_decorator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
describe Tramway::BaseDecorator do
subject(:decorated_object) { described_class.new(object) }

let(:object) { User.first }
let(:object) { create :user }
let(:decorator) { described_class }

describe '#initialize' do
Expand Down
4 changes: 2 additions & 2 deletions spec/helpers/navbar_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@

describe '#tramway_navbar' do
context 'with success' do
let(:left_items_css) { 'nav .flex ul.flex.items-center.space-x-4' }
let(:right_items_css) { 'nav ul.flex.items-center.space-x-4' }
let(:left_items_css) { 'nav .flex ul.hidden.sm\\:flex.items-center.space-x-4' }
let(:right_items_css) { 'nav ul.hidden.sm\\:flex.items-center.space-x-4' }

it 'renders navbar with tailwind styles' do
fragment = view.tramway_navbar
Expand Down
4 changes: 2 additions & 2 deletions spec/initializers/tramway_load_routes_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

describe 'Tramway::Engine load_routes initializer', type: :routing do
it 'defines routes for each entity in Tramway::Config.entities' do
expect(get: '/admin/podcasts').to route_to(controller: 'tramway/entities', action: 'index')
expect(get: '/admin/users').to route_to(controller: 'tramway/entities', action: 'index')
expect(get: '/admin/posts').to route_to(controller: 'tramway/entities', action: 'index', entity: 'post')
expect(get: '/admin/comments').to route_to(controller: 'tramway/entities', action: 'index', entity: 'comment')
end

it 'does not define non-existent routes' do
Expand Down

0 comments on commit 8f975be

Please sign in to comment.