Sha256: b239179810050c237a6d01bd34f5ea8334e2799a0afb8c472e2d60c76b160e69

Contents?: true

Size: 598 Bytes

Versions: 4

Compression:

Stored size: 598 Bytes

Contents

require 'test_helper'

class DocsControllerTest < ActiveSupport::IntegrationCase
  DOCS_PATH = File.join(File.dirname(__FILE__), '../../app/views/opro/oauth/docs/markdown/*.md.erb')

  test 'renders index' do
    visit oauth_docs_path
    assert_equal '/oauth_docs', current_path
  end

  test 'renders show' do
    Dir[DOCS_PATH].each do |file|
      doc =  file.split('/').last.gsub('.md.erb', '')
      doc_path = oauth_doc_path(:id => doc)
      visit doc_path
      assert_equal doc_path, current_path
      refute has_content?("The page you were looking for doesn't exist")
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
opro-0.5.0 test/integration/docs_controller_test.rb
opro-0.4.3 test/integration/docs_controller_test.rb
opro-0.4.2 test/integration/docs_controller_test.rb
opro-0.4.1 test/integration/docs_controller_test.rb