File tree Expand file tree Collapse file tree
spec/octocatalog-diff/tests/api/v1 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 278278 _foo = described_class . create_from_input ( arg )
279279 end . to raise_error ( ArgumentError , /Illegal float 'blahblah'/ )
280280 end
281+
282+ it 'should return constructed object when given a string' do
283+ result = described_class . create_from_input ( 'foo=(string)bar' )
284+ expect ( result ) . to be_a_kind_of ( OctocatalogDiff ::API ::V1 ::Override )
285+ expect ( result . key ) . to eq ( 'foo' )
286+ expect ( result . value ) . to eq ( 'bar' )
287+ end
288+
289+ it 'should return constructed object when given a key and a string' do
290+ result = described_class . create_from_input ( 'foo=(string)bar' , 'my_key_name' )
291+ expect ( result ) . to be_a_kind_of ( OctocatalogDiff ::API ::V1 ::Override )
292+ expect ( result . key ) . to eq ( 'my_key_name' )
293+ expect ( result . value ) . to eq ( 'foo=(string)bar' )
294+ end
281295 end
282296end
You can’t perform that action at this time.
0 commit comments