Skip to content

Commit

Permalink
add spec for altering presets to point to qa
Browse files Browse the repository at this point in the history
  • Loading branch information
Jammjammjamm committed Dec 12, 2024
1 parent 5352dfb commit 39168ba
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion spec/fixtures/simple_preset.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"type": "text",
"title": "Title",
"description": "Description",
"value": "https://hardcoded.example.org"
"value": "https://inferno.healthit.gov"
}
]
}
13 changes: 12 additions & 1 deletion spec/inferno/repositories/presets_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
type: 'text',
title: 'Title',
description: 'Description',
value: 'https://hardcoded.example.org'
value: 'https://inferno.healthit.gov'
]
}
)
Expand Down Expand Up @@ -67,5 +67,16 @@
expect(inserted.inputs.first[:value]).to eq('http://default.example.com')
end
end

context 'when hosted on QA' do
before do
stub_const 'Inferno::Application', { 'base_url' => 'https://inferno-qa.healthit.gov' }
end

it 'replaces inferno.healthit.gov with inferno-qa.healthit.gov' do
inserted = presets.insert_from_file(simple_json)
expect(inserted.inputs.first[:value]).to eq('https://inferno-qa.healthit.gov')
end
end
end
end

0 comments on commit 39168ba

Please # to comment.