Wednesday, July 15, 2026 4:00:50 AM
> uptime_spec.rb
# frozen_string_literal: true

describe ESM::Command::Server::Uptime, category: "command" do
  include_context "command"
  include_examples "validate_command", requires_registration: false

  describe "#execute" do
    include_context "connection_v1"

    context "when the server is connected" do
      it "returns the uptime for the server" do
        execute!(arguments: {server_id: server.server_id})

        embed = ESM.discord_bot.test_outbox.first.content

        expect(embed.description).to match(/`#{server.server_id}` has been online for (\d+ seconds?|less than 1 second)/i)
      end
    end
  end
end
All opinions represented herein are my own
- © 2024 - 2026 itsthedevman
- build 43aa0d7