<commit_before>require 'spec_helper'
require 'debugger'

describe Tracker::IssuesController do

  before(:each) do
    Tracker.config.user   = "mcifani"
    Tracker.config.repo   = "active_progress"
    Tracker.config.labels = "public"
  end

  describe "GET 'index'" do

    it "should be successful" do
      Tracker.config.state = "open"
      get 'index', use_route: :root
      response.should be_success
    end
  end

  describe "GET 'resolved'" do

    it "should be success on current issues marked with closed state" do
      Tracker.config.state = "closed"
      get 'resolved', use_route: :resolved
      response.should be_success
    end
  end

  describe "GET 'un_track'" do

    it "should not locate a user issue if none exist" do
      controller.stub_chain(:current_user,:id)
      get 'un_track', use_route: :un_track
      assigns(:issue).should be_empty
    end
  end

end<commit_msg>coverage additions for current tracking issues action<commit_after>require 'spec_helper'
require 'debugger'

describe Tracker::IssuesController do

  before(:each) do
    Tracker.config.user   = "mcifani"
    Tracker.config.repo   = "active_progress"
    Tracker.config.labels = "public"
  end

  describe "GET 'index'" do

    it "should be successful" do
      Tracker.config.state = "open"
      get 'index', use_route: :root
      response.should be_success
    end
  end

  describe "GET 'resolved'" do

    it "should be success on current issues marked with closed state" do
      Tracker.config.state = "closed"
      get 'resolved', use_route: :resolved
      response.should be_success
    end
  end

  describe "GET 'un_track'" do

    it "should not locate a user issue if none exist" do
      controller.stub_chain(:current_user,:id)
      get 'un_track', use_route: :un_track
      assigns(:issue).should be_empty
    end
  end

  describe "GET 'current_tracking'" do

    it "should be success" do
      controller.stub(:authenticate_user!)
      controller.stub_chain(:current_user,:id)
      get 'currently_tracking', use_route: :saved
      response.should be_success
    end

    it "should not locate any currently tracked issues without existing user" do
      controller.stub(:authenticate_user!)
      controller.stub_chain(:current_user,:id)
      get 'currently_tracking', use_route: :saved
      assigns(:currently_tracked).should be_empty
    end
  end

end
{'fraction_non_alphanumeric': 0.08744769874476988, 'fraction_numerical': 0.0, 'mean_word_length': 3.194736842105263, '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': '1875641', 'n_tokens_mistral': 740, 'n_tokens_neox': 706, 'n_words': 217}