<commit_before>defmodule SlackCoder.PageViewTest do
  use SlackCoder.ConnCase, async: true
  alias SlackCoder.PageView
  alias SlackCoder.Github.PullRequest.Commit
  alias SlackCoder.Github.PullRequest.PR

  describe "pull_request.html" do

    it "blank commit" do
      expect {:safe, _} = PageView.render("pull_request.html", commit: %Commit{})
    end

    it "populated commit with a PR" do
      pr = %PR{slack_user: "slack", html_url: "url", repo: "myrepo", watcher: self, statuses_url: "statuses", title: "MY PR", number: 4321}
      commit = %Commit{id: 123, travis_url: "travis", code_climate_url: "codeclimate", status: :success, code_climate_status: :success, pr: pr, sha: "1234", github_user: "gituser", github_user_avatar: "avatar.jpg"}
      expect {:safe, _} = PageView.render("pull_request.html", commit: commit)
    end

  end
end
<commit_msg>Fix up tests. Watching first auto deploy...<commit_after>defmodule SlackCoder.PageViewTest do
  use SlackCoder.ConnCase, async: true
  alias SlackCoder.PageView
  alias SlackCoder.Github.PullRequest.Commit
  alias SlackCoder.Github.PullRequest.PR

  describe "pull_request.html" do

    it "bare minimum commit data" do
      expect {:safe, _} = PageView.render("pull_request.html", commit: %Commit{pr: %PR{html_url: "http://github.com/", title: "Github"}})
    end

    it "populated commit with a PR" do
      pr = %PR{slack_user: "slack", html_url: "url", repo: "myrepo", watcher: self, statuses_url: "statuses", title: "MY PR", number: 4321}
      commit = %Commit{id: 123, travis_url: "travis", code_climate_url: "codeclimate", status: :success, code_climate_status: :success, pr: pr, sha: "1234", github_user: "gituser", github_user_avatar: "avatar.jpg"}
      expect {:safe, _} = PageView.render("pull_request.html", commit: commit)
    end

  end
end

{'fraction_non_alphanumeric': 0.13296703296703297, 'fraction_numerical': 0.012087912087912088, 'mean_word_length': 4.568807339449541, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1981119', 'n_tokens_mistral': 667, 'n_tokens_neox': 635, 'n_words': 164}