Skip to content

Commit 31a0173

Browse files
nevineradblock
authored andcommitted
check that the options are correctly parsed from html (#53)
1 parent 39feb1d commit 31a0173

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

.ruby-gemset

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
grape-swagger-rails

spec/features/swagger_spec.rb

+7
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@
1616
before do
1717
@options = GrapeSwaggerRails.options.dup
1818
end
19+
20+
it 'evaluates config options correctly' do
21+
visit '/swagger'
22+
page_options_json = page.evaluate_script("$('html').data('swagger-options')").to_json
23+
expect(page_options_json).to eq(@options.marshal_dump.to_json)
24+
end
25+
1926
context '#headers' do
2027
before do
2128
GrapeSwaggerRails.options.headers['X-Test-Header'] = 'Test Value'

0 commit comments

Comments
 (0)