<commit_before>require 'spec_helper'

describe "photos/new" do
  before(:each) do
    @member = FactoryGirl.create(:member)
    controller.stub(:current_user) { @member }
    assign(:photo, FactoryGirl.create(:photo))
    assign(:flickr_auth, FactoryGirl.create(:flickr_authentication, :member => @member))
  end

  it "renders new photo form" do
    render

    # Run the generator again with the --webrat flag if you want to use webrat matchers
    assert_select "form", :action => photos_path, :method => "post" do
      assert_select "input#photo_owner_id", :name => "photo[owner_id]"
      assert_select "input#photo_flickr_photo_id", :name => "photo[flickr_photo_id]"
      assert_select "input#photo_thumbnail_url", :name => "photo[thumbnail_url]"
      assert_select "input#photo_fullsize_url", :name => "photo[fullsize_url]"
    end
  end
end<commit_msg>Test for photo thumbnails; stub Flickr username/id.<commit_after>require 'spec_helper'

describe "photos/new" do
  before(:each) do
    @member = FactoryGirl.create(:member)
    controller.stub(:current_user) { @member }
    flickr_login = double("flickr_login")
    flickr_login.stub(:username) { @member.login_name }
    flickr_login.stub(:id) { 1337 }
    assign(:flickr_login, flickr_login)
    assign(:photos, [])
    assign(:flickr_auth, FactoryGirl.create(:flickr_authentication, :member => @member))
  end

  it "shows a list of photos" do
    render
    assert_select "ul.thumbnails"
  end
end
{'fraction_non_alphanumeric': 0.12286689419795221, 'fraction_numerical': 0.0027303754266211604, 'mean_word_length': 4.574144486692015, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '4655475', 'n_tokens_mistral': 501, 'n_tokens_neox': 475, 'n_words': 108}