We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ec976f commit bf825bdCopy full SHA for bf825bd
2 files changed
app/models/print_host.rb
@@ -13,4 +13,8 @@ class NotReady < RuntimeError
13
def service
14
PROTOCOLS[protocol].new(print_host: self)
15
end
16
+
17
+ def input_types
18
+ PROTOCOLS[protocol]::INPUT_TYPES
19
+ end
20
spec/models/print_host_spec.rb
@@ -24,4 +24,12 @@
24
expect(described_class.create(attributes.merge(protocol: :nope))).not_to be_valid
25
26
27
28
+ context "with a valid print host" do
29
+ let(:print_host) { create(:print_host) }
30
31
+ it "can list input types" do
32
+ expect(print_host.input_types.map(&:to_s)).to eq ["text/x-gcode"]
33
34
35
0 commit comments