Convert activity stream cuke
This commit is contained in:
parent
2b72fd0f35
commit
226f1bbfc3
2 changed files with 10 additions and 24 deletions
|
|
@ -1,23 +0,0 @@
|
|||
@javascript
|
||||
Feature: The activity stream
|
||||
Scenario: Sorting
|
||||
Given a user with username "bob"
|
||||
When I sign in as "bob@bob.bob"
|
||||
|
||||
And I click the publisher and post "A- I like turtles"
|
||||
And I click the publisher and post "B- barack obama is your new bicycle"
|
||||
And I click the publisher and post "C- barack obama is a square"
|
||||
|
||||
When I go to the activity stream page
|
||||
Then "C- barack obama is a square" should be post 1
|
||||
And "B- barack obama is your new bicycle" should be post 2
|
||||
And "A- I like turtles" should be post 3
|
||||
|
||||
When I like the post "A- I like turtles"
|
||||
And I comment "Sassy sawfish" on "C- barack obama is a square"
|
||||
And I like the post "B- barack obama is your new bicycle"
|
||||
|
||||
When I go to the activity stream page
|
||||
Then "B- barack obama is your new bicycle" should be post 1
|
||||
And "C- barack obama is a square" should be post 2
|
||||
And "A- I like turtles" should be post 3
|
||||
|
|
@ -3,10 +3,19 @@ require Rails.root.join('spec', 'shared_behaviors', 'stream')
|
|||
|
||||
describe Stream::Activity do
|
||||
before do
|
||||
@stream = Stream::Activity.new(alice, :max_time => Time.now, :order => 'updated_at')
|
||||
@stream = Stream::Activity.new(alice)
|
||||
end
|
||||
|
||||
describe 'shared behaviors' do
|
||||
it_should_behave_like 'it is a stream'
|
||||
end
|
||||
|
||||
describe "#posts" do
|
||||
it "calls EvilQuery::Participation with correct parameters" do
|
||||
expect(::EvilQuery::Participation).to receive(:new)
|
||||
.with(alice)
|
||||
.and_return(double.tap { |m| allow(m).to receive(:posts)})
|
||||
@stream.posts
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue