Merge branch 'dev' into more-rubocop

This commit is contained in:
Shiny
2017-02-16 13:23:07 +13:00
committed by GitHub
16 changed files with 144 additions and 183 deletions

View File

@@ -77,13 +77,6 @@ Rails/OutputSafety:
- 'app/helpers/auto_suggest_helper.rb'
- 'app/helpers/gardens_helper.rb'
# Offense count: 1
# Configuration parameters: Include.
# Include: db/migrate/*.rb
Rails/ReversibleMigration:
Exclude:
- 'db/migrate/20130215131921_rename_notification_fields.rb'
# Offense count: 4
# Configuration parameters: Blacklist.
# Blacklist: decrement!, decrement_counter, increment!, increment_counter, toggle!, touch, update_all, update_attribute, update_column, update_columns, update_counters
@@ -483,44 +476,12 @@ Style/TernaryParentheses:
Exclude:
- 'app/helpers/plantings_helper.rb'
# Offense count: 4
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyleForMultiline, SupportedStylesForMultiline.
# SupportedStylesForMultiline: comma, consistent_comma, no_comma
Style/TrailingCommaInArguments:
Exclude:
- 'db/seeds.rb'
- 'lib/actions/oauth_signup_action.rb'
- 'lib/tasks/growstuff.rake'
# Offense count: 4
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyleForMultiline, SupportedStylesForMultiline.
# SupportedStylesForMultiline: comma, consistent_comma, no_comma
Style/TrailingCommaInLiteral:
Exclude:
- 'config/environments/test.rb'
- 'spec/rails_helper.rb'
# Offense count: 1
# Cop supports --auto-correct.
Style/UnlessElse:
Exclude:
- 'app/controllers/omniauth_callbacks_controller.rb'
# Offense count: 12
# Cop supports --auto-correct.
Style/UnneededInterpolation:
Exclude:
- 'spec/features/crops/crop_wranglers_spec.rb'
- 'spec/features/following_spec.rb'
- 'spec/features/shared_examples/append_date.rb'
- 'spec/models/crop_spec.rb'
- 'spec/models/forum_spec.rb'
- 'spec/models/member_spec.rb'
- 'spec/models/plant_part_spec.rb'
- 'spec/views/layouts/_header_spec.rb'
# Offense count: 3
# Cop supports --auto-correct.
Style/UnneededPercentQ:

View File

@@ -66,7 +66,7 @@ Geocoder::Lookup::Test.add_stub(
"Amundsen-Scott Base, Antarctica", [
{
'latitude' => -90.0,
'longitude' => 0.0,
'longitude' => 0.0
}
]
)
@@ -89,7 +89,7 @@ Geocoder::Lookup::Test.add_stub(
"Greenwich, UK", [
{
'latitude' => 51.483061,
'longitude' => -0.004151,
'longitude' => -0.004151
}
]
)
@@ -98,7 +98,7 @@ Geocoder::Lookup::Test.add_stub(
"Edinburgh", [
{
'latitude' => 55.953252,
'longitude' => -3.188267,
'longitude' => -3.188267
}
]
)

View File

@@ -1,6 +1,6 @@
class RenameNotificationFields < ActiveRecord::Migration
def change
change_table :notifications do |t|
change_table :notifications do |t| # rubocop:disable Rails/ReversibleMigration
t.rename :to_id, :recipient_id
t.rename :from_id, :sender_id
end

View File

@@ -17,7 +17,7 @@ ActiveRecord::Schema.define(version: 20170104035248) do
enable_extension "plpgsql"
create_table "account_types", force: :cascade do |t|
t.string "name", null: false
t.string "name", limit: 255, null: false
t.boolean "is_paid"
t.boolean "is_permanent_paid"
t.datetime "created_at"
@@ -33,31 +33,31 @@ ActiveRecord::Schema.define(version: 20170104035248) do
end
create_table "alternate_names", force: :cascade do |t|
t.string "name", null: false
t.integer "crop_id", null: false
t.integer "creator_id", null: false
t.string "name", limit: 255, null: false
t.integer "crop_id", null: false
t.integer "creator_id", null: false
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "authentications", force: :cascade do |t|
t.integer "member_id", null: false
t.string "provider", null: false
t.string "uid"
t.string "token"
t.string "secret"
t.integer "member_id", null: false
t.string "provider", limit: 255, null: false
t.string "uid", limit: 255
t.string "token", limit: 255
t.string "secret", limit: 255
t.datetime "created_at"
t.datetime "updated_at"
t.string "name"
t.string "name", limit: 255
end
add_index "authentications", ["member_id"], name: "index_authentications_on_member_id", using: :btree
create_table "comfy_cms_blocks", force: :cascade do |t|
t.string "identifier", null: false
t.string "identifier", limit: 255, null: false
t.text "content"
t.integer "blockable_id"
t.string "blockable_type"
t.string "blockable_type", limit: 255
t.datetime "created_at"
t.datetime "updated_at"
end
@@ -66,17 +66,17 @@ ActiveRecord::Schema.define(version: 20170104035248) do
add_index "comfy_cms_blocks", ["identifier"], name: "index_comfy_cms_blocks_on_identifier", using: :btree
create_table "comfy_cms_categories", force: :cascade do |t|
t.integer "site_id", null: false
t.string "label", null: false
t.string "categorized_type", null: false
t.integer "site_id", null: false
t.string "label", limit: 255, null: false
t.string "categorized_type", limit: 255, null: false
end
add_index "comfy_cms_categories", ["site_id", "categorized_type", "label"], name: "index_cms_categories_on_site_id_and_cat_type_and_label", unique: true, using: :btree
create_table "comfy_cms_categorizations", force: :cascade do |t|
t.integer "category_id", null: false
t.string "categorized_type", null: false
t.integer "categorized_id", null: false
t.integer "category_id", null: false
t.string "categorized_type", limit: 255, null: false
t.integer "categorized_id", null: false
end
add_index "comfy_cms_categorizations", ["category_id", "categorized_type", "categorized_id"], name: "index_cms_categorizations_on_cat_id_and_catd_type_and_catd_id", unique: true, using: :btree
@@ -84,9 +84,9 @@ ActiveRecord::Schema.define(version: 20170104035248) do
create_table "comfy_cms_files", force: :cascade do |t|
t.integer "site_id", null: false
t.integer "block_id"
t.string "label", null: false
t.string "file_file_name", null: false
t.string "file_content_type", null: false
t.string "label", limit: 255, null: false
t.string "file_file_name", limit: 255, null: false
t.string "file_content_type", limit: 255, null: false
t.integer "file_file_size", null: false
t.string "description", limit: 2048
t.integer "position", default: 0, null: false
@@ -100,16 +100,16 @@ ActiveRecord::Schema.define(version: 20170104035248) do
add_index "comfy_cms_files", ["site_id", "position"], name: "index_comfy_cms_files_on_site_id_and_position", using: :btree
create_table "comfy_cms_layouts", force: :cascade do |t|
t.integer "site_id", null: false
t.integer "site_id", null: false
t.integer "parent_id"
t.string "app_layout"
t.string "label", null: false
t.string "identifier", null: false
t.string "app_layout", limit: 255
t.string "label", limit: 255, null: false
t.string "identifier", limit: 255, null: false
t.text "content"
t.text "css"
t.text "js"
t.integer "position", default: 0, null: false
t.boolean "is_shared", default: false, null: false
t.integer "position", default: 0, null: false
t.boolean "is_shared", default: false, null: false
t.datetime "created_at"
t.datetime "updated_at"
end
@@ -118,18 +118,18 @@ ActiveRecord::Schema.define(version: 20170104035248) do
add_index "comfy_cms_layouts", ["site_id", "identifier"], name: "index_comfy_cms_layouts_on_site_id_and_identifier", unique: true, using: :btree
create_table "comfy_cms_pages", force: :cascade do |t|
t.integer "site_id", null: false
t.integer "site_id", null: false
t.integer "layout_id"
t.integer "parent_id"
t.integer "target_page_id"
t.string "label", null: false
t.string "slug"
t.string "full_path", null: false
t.string "label", limit: 255, null: false
t.string "slug", limit: 255
t.string "full_path", limit: 255, null: false
t.text "content_cache"
t.integer "position", default: 0, null: false
t.integer "children_count", default: 0, null: false
t.boolean "is_published", default: true, null: false
t.boolean "is_shared", default: false, null: false
t.integer "position", default: 0, null: false
t.integer "children_count", default: 0, null: false
t.boolean "is_published", default: true, null: false
t.boolean "is_shared", default: false, null: false
t.datetime "created_at"
t.datetime "updated_at"
end
@@ -138,8 +138,8 @@ ActiveRecord::Schema.define(version: 20170104035248) do
add_index "comfy_cms_pages", ["site_id", "full_path"], name: "index_comfy_cms_pages_on_site_id_and_full_path", using: :btree
create_table "comfy_cms_revisions", force: :cascade do |t|
t.string "record_type", null: false
t.integer "record_id", null: false
t.string "record_type", limit: 255, null: false
t.integer "record_id", null: false
t.text "data"
t.datetime "created_at"
end
@@ -147,24 +147,24 @@ ActiveRecord::Schema.define(version: 20170104035248) do
add_index "comfy_cms_revisions", ["record_type", "record_id", "created_at"], name: "index_cms_revisions_on_rtype_and_rid_and_created_at", using: :btree
create_table "comfy_cms_sites", force: :cascade do |t|
t.string "label", null: false
t.string "identifier", null: false
t.string "hostname", null: false
t.string "path"
t.string "locale", default: "en", null: false
t.boolean "is_mirrored", default: false, null: false
t.string "label", limit: 255, null: false
t.string "identifier", limit: 255, null: false
t.string "hostname", limit: 255, null: false
t.string "path", limit: 255
t.string "locale", limit: 255, default: "en", null: false
t.boolean "is_mirrored", default: false, null: false
end
add_index "comfy_cms_sites", ["hostname"], name: "index_comfy_cms_sites_on_hostname", using: :btree
add_index "comfy_cms_sites", ["is_mirrored"], name: "index_comfy_cms_sites_on_is_mirrored", using: :btree
create_table "comfy_cms_snippets", force: :cascade do |t|
t.integer "site_id", null: false
t.string "label", null: false
t.string "identifier", null: false
t.integer "site_id", null: false
t.string "label", limit: 255, null: false
t.string "identifier", limit: 255, null: false
t.text "content"
t.integer "position", default: 0, null: false
t.boolean "is_shared", default: false, null: false
t.integer "position", default: 0, null: false
t.boolean "is_shared", default: false, null: false
t.datetime "created_at"
t.datetime "updated_at"
end
@@ -181,16 +181,16 @@ ActiveRecord::Schema.define(version: 20170104035248) do
end
create_table "crops", force: :cascade do |t|
t.string "name", null: false
t.string "en_wikipedia_url"
t.string "name", limit: 255, null: false
t.string "en_wikipedia_url", limit: 255
t.datetime "created_at"
t.datetime "updated_at"
t.string "slug"
t.string "slug", limit: 255
t.integer "parent_id"
t.integer "plantings_count", default: 0
t.integer "plantings_count", default: 0
t.integer "creator_id"
t.integer "requester_id"
t.string "approval_status", default: "approved"
t.string "approval_status", limit: 255, default: "approved"
t.text "reason_for_rejection"
t.text "request_notes"
t.text "rejection_notes"
@@ -216,29 +216,29 @@ ActiveRecord::Schema.define(version: 20170104035248) do
end
create_table "forums", force: :cascade do |t|
t.string "name", null: false
t.text "description", null: false
t.integer "owner_id", null: false
t.string "name", limit: 255, null: false
t.text "description", null: false
t.integer "owner_id", null: false
t.datetime "created_at"
t.datetime "updated_at"
t.string "slug"
t.string "slug", limit: 255
end
add_index "forums", ["slug"], name: "index_forums_on_slug", unique: true, using: :btree
create_table "gardens", force: :cascade do |t|
t.string "name", null: false
t.string "name", limit: 255, null: false
t.integer "owner_id"
t.string "slug", null: false
t.string "slug", limit: 255, null: false
t.datetime "created_at"
t.datetime "updated_at"
t.text "description"
t.boolean "active", default: true
t.string "location"
t.boolean "active", default: true
t.string "location", limit: 255
t.float "latitude"
t.float "longitude"
t.decimal "area"
t.string "area_unit"
t.string "area_unit", limit: 255
end
add_index "gardens", ["owner_id"], name: "index_gardens_on_owner_id", using: :btree
@@ -252,17 +252,17 @@ ActiveRecord::Schema.define(version: 20170104035248) do
add_index "gardens_photos", ["garden_id", "photo_id"], name: "index_gardens_photos_on_garden_id_and_photo_id", using: :btree
create_table "harvests", force: :cascade do |t|
t.integer "crop_id", null: false
t.integer "owner_id", null: false
t.integer "crop_id", null: false
t.integer "owner_id", null: false
t.date "harvested_at"
t.decimal "quantity"
t.string "unit"
t.string "unit", limit: 255
t.text "description"
t.datetime "created_at"
t.datetime "updated_at"
t.string "slug"
t.string "slug", limit: 255
t.decimal "weight_quantity"
t.string "weight_unit"
t.string "weight_unit", limit: 255
t.integer "plant_part_id"
t.float "si_weight"
t.integer "planting_id"
@@ -291,38 +291,38 @@ ActiveRecord::Schema.define(version: 20170104035248) do
add_index "likes", ["member_id"], name: "index_likes_on_member_id", using: :btree
create_table "members", force: :cascade do |t|
t.string "email", default: "", null: false
t.string "encrypted_password", default: "", null: false
t.string "reset_password_token"
t.string "email", limit: 255, default: "", null: false
t.string "encrypted_password", limit: 255, default: "", null: false
t.string "reset_password_token", limit: 255
t.datetime "reset_password_sent_at"
t.datetime "remember_created_at"
t.integer "sign_in_count", default: 0
t.integer "sign_in_count", default: 0
t.datetime "current_sign_in_at"
t.datetime "last_sign_in_at"
t.string "current_sign_in_ip"
t.string "last_sign_in_ip"
t.string "confirmation_token"
t.string "current_sign_in_ip", limit: 255
t.string "last_sign_in_ip", limit: 255
t.string "confirmation_token", limit: 255
t.datetime "confirmed_at"
t.datetime "confirmation_sent_at"
t.string "unconfirmed_email"
t.integer "failed_attempts", default: 0
t.string "unlock_token"
t.string "unconfirmed_email", limit: 255
t.integer "failed_attempts", default: 0
t.string "unlock_token", limit: 255
t.datetime "locked_at"
t.datetime "created_at"
t.datetime "updated_at"
t.string "login_name"
t.string "slug"
t.string "login_name", limit: 255
t.string "slug", limit: 255
t.boolean "tos_agreement"
t.boolean "show_email"
t.string "location"
t.string "location", limit: 255
t.float "latitude"
t.float "longitude"
t.boolean "send_notification_email", default: true
t.boolean "send_notification_email", default: true
t.text "bio"
t.integer "plantings_count"
t.boolean "newsletter"
t.boolean "send_planting_reminder", default: true
t.string "preferred_avatar_uri"
t.boolean "send_planting_reminder", default: true
t.string "preferred_avatar_uri", limit: 255
end
add_index "members", ["confirmation_token"], name: "index_members_on_confirmation_token", unique: true, using: :btree
@@ -338,10 +338,10 @@ ActiveRecord::Schema.define(version: 20170104035248) do
create_table "notifications", force: :cascade do |t|
t.integer "sender_id"
t.integer "recipient_id", null: false
t.string "subject"
t.integer "recipient_id", null: false
t.string "subject", limit: 255
t.text "body"
t.boolean "read", default: false
t.boolean "read", default: false
t.integer "post_id"
t.datetime "created_at"
t.datetime "updated_at"
@@ -361,9 +361,9 @@ ActiveRecord::Schema.define(version: 20170104035248) do
t.datetime "updated_at"
t.datetime "completed_at"
t.integer "member_id"
t.string "paypal_express_token"
t.string "paypal_express_payer_id"
t.string "referral_code"
t.string "paypal_express_token", limit: 255
t.string "paypal_express_payer_id", limit: 255
t.string "referral_code", limit: 255
end
create_table "orders_products", id: false, force: :cascade do |t|
@@ -372,16 +372,16 @@ ActiveRecord::Schema.define(version: 20170104035248) do
end
create_table "photos", force: :cascade do |t|
t.integer "owner_id", null: false
t.string "thumbnail_url", null: false
t.string "fullsize_url", null: false
t.integer "owner_id", null: false
t.string "thumbnail_url", limit: 255, null: false
t.string "fullsize_url", limit: 255, null: false
t.datetime "created_at"
t.datetime "updated_at"
t.string "title", null: false
t.string "license_name", null: false
t.string "license_url"
t.string "link_url", null: false
t.string "flickr_photo_id"
t.string "title", limit: 255, null: false
t.string "license_name", limit: 255, null: false
t.string "license_url", limit: 255
t.string "link_url", limit: 255, null: false
t.string "flickr_photo_id", limit: 255
end
create_table "photos_plantings", id: false, force: :cascade do |t|
@@ -397,25 +397,25 @@ ActiveRecord::Schema.define(version: 20170104035248) do
add_index "photos_seeds", ["seed_id", "photo_id"], name: "index_photos_seeds_on_seed_id_and_photo_id", using: :btree
create_table "plant_parts", force: :cascade do |t|
t.string "name"
t.string "name", limit: 255
t.datetime "created_at"
t.datetime "updated_at"
t.string "slug"
t.string "slug", limit: 255
end
create_table "plantings", force: :cascade do |t|
t.integer "garden_id", null: false
t.integer "crop_id", null: false
t.integer "garden_id", null: false
t.integer "crop_id", null: false
t.date "planted_at"
t.integer "quantity"
t.text "description"
t.datetime "created_at"
t.datetime "updated_at"
t.string "slug"
t.string "sunniness"
t.string "planted_from"
t.string "slug", limit: 255
t.string "sunniness", limit: 255
t.string "planted_from", limit: 255
t.integer "owner_id"
t.boolean "finished", default: false
t.boolean "finished", default: false
t.date "finished_at"
t.integer "days_before_maturity"
end
@@ -423,12 +423,12 @@ ActiveRecord::Schema.define(version: 20170104035248) do
add_index "plantings", ["slug"], name: "index_plantings_on_slug", unique: true, using: :btree
create_table "posts", force: :cascade do |t|
t.integer "author_id", null: false
t.string "subject", null: false
t.text "body", null: false
t.integer "author_id", null: false
t.string "subject", limit: 255, null: false
t.text "body", null: false
t.datetime "created_at"
t.datetime "updated_at"
t.string "slug"
t.string "slug", limit: 255
t.integer "forum_id"
end
@@ -436,9 +436,9 @@ ActiveRecord::Schema.define(version: 20170104035248) do
add_index "posts", ["slug"], name: "index_posts_on_slug", unique: true, using: :btree
create_table "products", force: :cascade do |t|
t.string "name", null: false
t.text "description", null: false
t.integer "min_price", null: false
t.string "name", limit: 255, null: false
t.text "description", null: false
t.integer "min_price", null: false
t.datetime "created_at"
t.datetime "updated_at"
t.integer "account_type_id"
@@ -447,38 +447,38 @@ ActiveRecord::Schema.define(version: 20170104035248) do
end
create_table "roles", force: :cascade do |t|
t.string "name", null: false
t.string "name", limit: 255, null: false
t.text "description"
t.datetime "created_at"
t.datetime "updated_at"
t.string "slug"
t.string "slug", limit: 255
end
add_index "roles", ["slug"], name: "index_roles_on_slug", unique: true, using: :btree
create_table "scientific_names", force: :cascade do |t|
t.string "name", null: false
t.integer "crop_id", null: false
t.string "name", limit: 255, null: false
t.integer "crop_id", null: false
t.datetime "created_at"
t.datetime "updated_at"
t.integer "creator_id"
end
create_table "seeds", force: :cascade do |t|
t.integer "owner_id", null: false
t.integer "crop_id", null: false
t.integer "owner_id", null: false
t.integer "crop_id", null: false
t.text "description"
t.integer "quantity"
t.date "plant_before"
t.datetime "created_at"
t.datetime "updated_at"
t.string "tradable_to", default: "nowhere"
t.string "slug"
t.string "tradable_to", limit: 255, default: "nowhere"
t.string "slug", limit: 255
t.integer "days_until_maturity_min"
t.integer "days_until_maturity_max"
t.text "organic", default: "unknown"
t.text "gmo", default: "unknown"
t.text "heirloom", default: "unknown"
t.text "organic", default: "unknown"
t.text "gmo", default: "unknown"
t.text "heirloom", default: "unknown"
end
add_index "seeds", ["slug"], name: "index_seeds_on_slug", unique: true, using: :btree

View File

@@ -172,7 +172,7 @@ def load_products
name: "Seed account",
description: "Paid account, in perpetuity",
min_price: 15000,
account_type_id: @seed_account.id,
account_type_id: @seed_account.id
)
end

View File

@@ -43,7 +43,7 @@ class Growstuff::OauthSignupAction
.create_with(
name: name,
token: auth['credentials']['token'],
secret: auth['credentials']['secret'],
secret: auth['credentials']['secret']
)
.find_or_create_by(
provider: auth['provider'],

View File

@@ -135,7 +135,7 @@ namespace :growstuff do
"a paid account, in perpetuity. This account "\
"type never expires.",
min_price: 15000,
account_type_id: @seed_account.id,
account_type_id: @seed_account.id
)
puts "Giving each member an account record..."
@@ -303,7 +303,7 @@ namespace :growstuff do
alternate_names.split(/,\s*/).each do |an|
AlternateName.where(
name: an,
crop_id: crop.id,
crop_id: crop.id
).first_or_create do |x|
x.creator = cropbot
end

View File

@@ -28,7 +28,7 @@ feature "crop wranglers", js: true do
click_link wrangler.login_name
click_link 'Crop Wrangling'
within '#recently-added-crops' do
expect(page).to have_content "#{crops.first.creator.login_name}"
expect(page).to have_content crops.first.creator.login_name.to_s
end
end

View File

@@ -43,7 +43,7 @@ feature "follows", :js do
scenario "has a followed member listed in the following page" do
click_link 'Follow'
visit member_follows_path(member)
expect(page).to have_content "#{other_member.login_name}"
expect(page).to have_content other_member.login_name.to_s
end
scenario "does not die when passed an authenticity_token" do
@@ -62,22 +62,22 @@ feature "follows", :js do
scenario "has member in following list" do
click_link 'Follow'
visit member_follows_path(member)
expect(page).to have_content "#{other_member.login_name}"
expect(page).to have_content other_member.login_name.to_s
end
scenario "appears in in followed member's followers list" do
click_link 'Follow'
visit member_followers_path(other_member)
expect(page).to have_content "#{member.login_name}"
expect(page).to have_content member.login_name.to_s
end
scenario "removes members from following and followers lists after unfollow" do
click_link 'Follow'
click_link 'Unfollow'
visit member_follows_path(member)
expect(page).not_to have_content "#{other_member.login_name}"
expect(page).not_to have_content other_member.login_name.to_s
visit member_followers_path(other_member)
expect(page).to have_content "#{member.login_name}"
expect(page).to have_content member.login_name.to_s
end
end
end

View File

@@ -7,7 +7,7 @@ shared_examples "append date" do
scenario "Selecting a date with datepicker" do
click_link link_text
within "div.datepicker" do
expect(page).to have_content "#{this_month}"
expect(page).to have_content this_month.to_s
find(".datepicker-days td.day", text: "21").click
end
expect(page).to have_content "Finished: #{this_month} 21, #{this_year}"

View File

@@ -18,7 +18,7 @@ describe Crop do
it 'should stringify as the system name' do
crop.save
crop.to_s.should == 'tomato'
"#{crop}".should == 'tomato'
crop.to_s.should == 'tomato'
end
it 'has a creator' do

View File

@@ -8,7 +8,7 @@ describe Forum do
end
it "stringifies nicely" do
"#{forum}".should eq forum.name
forum.to_s.should eq forum.name
end
it 'has a slug' do

View File

@@ -39,7 +39,7 @@ describe 'member' do
it 'should stringify as the login_name' do
member.to_s.should match(/member\d+/)
"#{member}".should match(/member\d+/)
member.to_s.should match(/member\d+/)
end
it 'should be able to fetch posts' do

View File

@@ -3,7 +3,7 @@ require 'rails_helper'
describe PlantPart do
it 'stringifies' do
@pp = FactoryGirl.create(:plant_part)
"#{@pp}".should eq @pp.name
@pp.to_s.should eq @pp.name
end
it 'has crops' do

View File

@@ -108,7 +108,7 @@ RSpec.configure do |config|
'gravatar.com',
'mapbox.com',
'okfn.org',
'googlecode.com',
'googlecode.com'
] if page.driver.browser.respond_to?(:url_blacklist)
page.driver.browser.manage.window.maximize if page.driver.browser.respond_to?(:manage)

View File

@@ -72,7 +72,7 @@ describe 'layouts/_header.html.haml', type: "view" do
context "login name" do
it 'should have member login name' do
rendered.should have_content "#{@member.login_name}"
rendered.should have_content @member.login_name.to_s
end
it "should show link to member's gardens" do
assert_select("a[href='#{gardens_by_owner_path(owner: @member.slug)}']", "Gardens")