Added setup model

Necessary to model the API response.
This commit is contained in:
Brooke Kuhlmann
2025-04-22 14:24:33 -06:00
parent 3d183df433
commit 0dfdee3a9a
2 changed files with 30 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
# frozen_string_literal: true
require "spec_helper"
RSpec.describe TRMNL::API::Models::Setup do
describe ".for" do
it "answers record for attributes" do
attributes = {
api_key: "abc",
friendly_id: "10CBAF",
image_url: "https://usetrmnl.com/images/logo.bmp",
message: "Welcome!"
}
expect(described_class.for(attributes)).to eq(described_class[**attributes])
end
end
end