<commit_before>require 'test_helper'

class RunsControllerTest < ActionController::TestCase

  tests TavernaPlayer::RunsController

  test "should get create form" do
    get :new, :workflow_id => create(:workflow).id, :use_route => :taverna_player

    assert_response :success
  end

  test "should get edit form" do
    run = create(:run)
    sign_in run.user

    get :edit, :id => run.id

    assert_response :success
  end

  test "shouldn't get edit form if unauthorized" do
    run = create(:run)

    get :edit, :id => run.id

    assert_response :unauthorized
  end
<commit_msg>Make sure the overridden find_runs is tested.<commit_after>require 'test_helper'

class RunsControllerTest < ActionController::TestCase

  tests TavernaPlayer::RunsController

  test "should get all runs" do
    get :index, :use_route => :taverna_player

    assert_not_nil assigns(:runs)
    assert_response :success
  end

  test "should get create form" do
    get :new, :workflow_id => create(:workflow).id, :use_route => :taverna_player

    assert_response :success
  end

  test "should get edit form" do
    run = create(:run)
    sign_in run.user

    get :edit, :id => run.id

    assert_response :success
  end

  test "shouldn't get edit form if unauthorized" do
    run = create(:run)

    get :edit, :id => run.id

    assert_response :unauthorized
  end

{'fraction_non_alphanumeric': 0.09064112011790715, 'fraction_numerical': 0.0, 'mean_word_length': 3.5878378378378377, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 12, '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': '3387195', 'n_tokens_mistral': 448, 'n_tokens_neox': 421, 'n_words': 133}