Files
game-data/spec/models/hardware_model_spec.rb
Gregory Ballantine 12ece12394
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Fixed some lints
2025-08-13 14:13:26 -04:00

26 lines
697 B
Ruby

# frozen_string_literal: true
require_relative '../spec_helper'
RSpec.describe(Hardware) do
describe 'Hardware Creation' do
it 'Hardware creation updates model count.' do
expect { described_class.create(name: 'Test Hardware', type: 'gpu') }.to(change(described_class, :count).by(1))
end
end
describe 'Hardware Read' do
before { described_class.create(name: 'Test Hardware', type: 'gpu') }
it 'Hardware model has name.' do
hardware = described_class.first()
expect(hardware.name).to(eq('Test Hardware'))
end
it 'Hardware model has scoring.' do
hardware = described_class.first()
expect(hardware.type).to(eq('gpu'))
end
end
end