Skip to content

Commit

Permalink
initiated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
iCHAIT committed Aug 22, 2016
1 parent d259b78 commit ab8b02f
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ gem 'shotgun', '~> 0.9.1'
gem 'sinatra-flash', '~> 0.3.0'
gem 'rubocop', require: false
gem 'sinatra-contrib', '~> 1.4', '>= 1.4.7'
gem 'rack-test', '~> 0.6.3'
41 changes: 41 additions & 0 deletions tests.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
require_relative 'app'
require 'test/unit'
require 'rack/test'

class MyAppTest < Test::Unit::TestCase
include Rack::Test::Methods

def app
Sinatra::Application
end

def test_login_endpoint
get '/'
assert last_response.body.include?('Please Sign In')
end

def test_home_endpoint
get '/home'
assert last_response.body.include?('View Details')
end

def test_activities_endpoint
get '/activities'
assert last_response.body.include?('Activities')
end

def test_projects_endpoint
get '/projects'
assert last_response.body.include?('Projects')
end

def test_times_endpoint
get '/times'
assert last_response.body.include?('Times')
end

def test_users_endpoint
get '/users'
assert last_response.body.include?('Users')
end
end

0 comments on commit ab8b02f

Please sign in to comment.