diff --git a/features/desktop/tags.feature b/features/desktop/tags.feature deleted file mode 100644 index cf438d97b413804c46b0c44d4de830813231d002..0000000000000000000000000000000000000000 --- a/features/desktop/tags.feature +++ /dev/null @@ -1,13 +0,0 @@ -@javascript -Feature: Interacting with tags - - Background: - Given there is a user "Samuel Beckett" who's tagged "#rockstar" - And I am signed in - And I am on the homepage - - Scenario: Searching for a tag - When I search for "#rockstar" - Then I should be on the tag page for "rockstar" - And I should see "Samuel Beckett" - diff --git a/features/desktop/tags_and_comments.feature b/features/desktop/tags_and_comments.feature deleted file mode 100644 index 35111cc22dc3f33582c8d5d5469917179aaa9346..0000000000000000000000000000000000000000 --- a/features/desktop/tags_and_comments.feature +++ /dev/null @@ -1,21 +0,0 @@ -@javascript -Feature: Issue #3382 The comments under postings are missing when using the #tags -view - - Background: - Given a user named "Bob Jones" with email "bob@bob.bob" - And I sign in as "bob@bob.bob" - When I post a status with the text "This is a post with a #tag" - And I am on the homepage - - Scenario: - When I search for "#tag" - Then I should be on the tag page for "tag" - And I should see "This is a post with a #tag" - - Scenario: - When I comment "this is a comment on my post" on "This is a post with a #tag" - And I search for "#tag" - Then I should be on the tag page for "tag" - And I should see "this is a comment on my post" - - diff --git a/spec/controllers/tags_controller_spec.rb b/spec/controllers/tags_controller_spec.rb index f2eef5b72b34daf6f69b7149fafd37c6b33fdb4c..06ccdf6eab71edc96e7b4933a43f8a2efae8807e 100644 --- a/spec/controllers/tags_controller_spec.rb +++ b/spec/controllers/tags_controller_spec.rb @@ -47,9 +47,22 @@ describe TagsController, :type => :controller do end end + context 'with a tagged user' do + before do + bob.profile.tag_string = "#cats #diaspora #rad" + bob.profile.build_tags + bob.profile.save! + end + + it 'includes the tagged user' do + get :show, :name => 'cats' + expect(response.body).to include(bob.diaspora_handle) + end + end + context 'with a tagged post' do before do - eve.post(:status_message, text: "#what #yes #hellyes #foo", public: true, to: 'all') + @post = eve.post(:status_message, text: "#what #yes #hellyes #foo tagged post", public: true, to: 'all') end context 'signed in' do @@ -66,6 +79,17 @@ describe TagsController, :type => :controller do get :show, :name => 'hellyes' expect(response.status).to eq(200) end + + it 'includes the tagged post' do + get :show, :name => 'foo' + expect(assigns[:stream].posts.first.text).to include("tagged post") + end + + it 'includes comments of the tagged post' do + alice.comment!(@post, "comment on a tagged post") + get :show, :name => 'foo', :format => 'json' + expect(response.body).to include("comment on a tagged post") + end end context "not signed in" do