diff --git a/app/views/users/_general.html.erb b/app/views/users/_general.html.erb
index 4dfb4c6..793668e 100644
--- a/app/views/users/_general.html.erb
+++ b/app/views/users/_general.html.erb
@@ -15,6 +15,9 @@
<%= link_to "Search for Steam Account" %>
+
Stream
+
<%= @user.profile.stream.blank? ? "No Stream Provided" : @user.profile.stream %>
+
Contact
diff --git a/spec/features/users/stream_spec.rb b/spec/features/users/stream_spec.rb
new file mode 100644
index 0000000..136dfb0
--- /dev/null
+++ b/spec/features/users/stream_spec.rb
@@ -0,0 +1,28 @@
+require "spec_helper"
+
+feature "User Stream Information" do
+ let(:password) { "foobar" }
+ let!(:user) { create :user, raw_password: password }
+
+ feature "stream administration" do
+ scenario "user updates their stream" do
+ visit user_path(user)
+ expect(page).to have_content("No Stream Provided")
+ fill_login_form(user, password)
+ click_button submit(:user, :login)
+ visit edit_user_path(user)
+ stream_url = "twitch.tv/gold_n"
+ expect(page).to have_content("Stream")
+ fill_in "user_profile_attributes_stream", with: stream_url
+ click_button "Update Profile"
+ expect(page).to have_content(I18n.t(:users_update))
+ visit user_path(user)
+ expect(page).to have_content(stream_url)
+ end
+ end
+
+ def fill_login_form(user, password)
+ fill_in "login_username", with: user.username
+ fill_in "login_password", with: password
+ end
+end
diff --git a/spec/models/topic_spec.rb b/spec/models/topic_spec.rb
index 592de27..437c409 100644
--- a/spec/models/topic_spec.rb
+++ b/spec/models/topic_spec.rb
@@ -32,9 +32,8 @@ describe Topic do
it "returns 5 unique, most recently posted topics" do
topics = []
10.times do
- topic = create :topic
- topics << topic
- 3.times { create :post, topic: topic }
+ topic = create :topic, first_post: "Foo"
+ topics.push(topic)
end
recent_topics = Topic.recent_topics
topics.last(5).each do |topic|