<commit_before>require 'spec_helper'

describe "images/show" do
  before(:each) do
    @image = assign(:image, stub_model(Image))
  end

  it "renders attributes in <p>" do
    render
    # Run the generator again with the --webrat flag if you want to use webrat matchers
  end

  it 'shows the user that uploaded this image' do
    uploader = create(:user)
    @image.user = uploader
    render
    rendered.should have_text(uploader.username)
  end
end<commit_msg>Test if page has a link back to uploader<commit_after>require 'spec_helper'

describe "images/show" do
  before(:each) do
    @image = assign(:image, stub_model(Image))
  end

  it "renders attributes in <p>" do
    render
    # Run the generator again with the --webrat flag if you want to use webrat matchers
  end

  it 'shows the user that uploaded this image' do
    uploader = create(:user)
    path_to_uploader =
      Rails.application.routes.url_helpers.user_path(uploader)

    @image.user = uploader

    render
    rendered.should have_text(uploader.username)
    rendered.should have_tag('a', :href => path_to_uploader)
  end
end
{'fraction_non_alphanumeric': 0.08483754512635379, 'fraction_numerical': 0.0, 'mean_word_length': 3.508130081300813, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, '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': '6632544', 'n_tokens_mistral': 358, 'n_tokens_neox': 349, 'n_words': 117}