Sha256: ca7b5995863b9e6c57dc4dd5e44e806f4e2d1c2e6378885d0070f425864bf2d8
Contents?: true
Size: 1.27 KB
Versions: 5
Compression:
Stored size: 1.27 KB
Contents
require 'test_helper' module Shipit class MergeStatusControllerTest < ActionController::TestCase setup do request.env['HTTPS'] = 'on' @request.host = URI(Shipit.host).host session[:user_id] = shipit_users(:walrus).id end test "GET show" do get :show, params: {referrer: 'https://github.com/Shopify/shipit-engine/pull/42', branch: 'master'} assert_response :ok assert_includes response.body, 'Ready to ship!' end test "GET show when there is no matching stacks" do get :show, params: {referrer: 'https://github.com/Shopify/unknown-repo/pull/42', branch: 'master'} assert_response :ok assert_predicate response.body, :blank? end test "GET anonymous show returns a login message" do session.delete(:user_id) get :show, params: {referrer: 'https://github.com/Shopify/shipit-engine/pull/42', branch: 'master'} assert_response :ok assert_includes response.body.downcase, 'please log in' end test "GET anonymous show when there is no matching stack is blank" do session.delete(:user_id) get :show, params: {referrer: 'https://github.com/Shopify/unknown-repo/pull/42', branch: 'master'} assert_response :ok assert_predicate response.body, :blank? end end end
Version data entries
5 entries across 5 versions & 1 rubygems