Skip to content

Commit

Permalink
Add admin acceptance test
Browse files Browse the repository at this point in the history
  • Loading branch information
bmarkons committed Jul 6, 2017
1 parent 53981a0 commit a049c85
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/admin_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ class AdminController < ApplicationController
password: Rails.application.secrets.admin_password
) unless Rails.env.test?

layout "admin"
layout 'admin'

before_action :set_repos
before_action :set_repo, :only => [:repo]
before_action :set_repo, only: [:repo]

def toggle_admin
session['admin'] = !session['admin']
Expand Down
10 changes: 10 additions & 0 deletions test/acceptance/admin_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
require 'acceptance/test_helper'

class AdminTest < AcceptanceTest
test 'Admin should be able to manually run suite for existing repo' do
repo = create(:repo)

visit admin_repo_path(repo.name)
page.must_have_content 'Run last'
end
end

0 comments on commit a049c85

Please sign in to comment.