Last rspec fix brought to you by jhass
This commit is contained in:
parent
087dbd4acf
commit
b7c68031fa
2 changed files with 4 additions and 3 deletions
|
|
@ -164,7 +164,7 @@ end
|
||||||
Then /^the "([^"]*)" checkbox(?: within "([^"]*)")? should not be checked$/ do |label, selector|
|
Then /^the "([^"]*)" checkbox(?: within "([^"]*)")? should not be checked$/ do |label, selector|
|
||||||
with_scope(selector) do
|
with_scope(selector) do
|
||||||
field_checked = find_field(label)['checked']
|
field_checked = find_field(label)['checked']
|
||||||
field_checked.should be false
|
field_checked.should be_falsey
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -52,8 +52,9 @@ describe StatusMessage, :type => :model do
|
||||||
|
|
||||||
describe '.user_tag_stream' do
|
describe '.user_tag_stream' do
|
||||||
it 'returns tag stream thats owned or visible by' do
|
it 'returns tag stream thats owned or visible by' do
|
||||||
expect(StatusMessage).to receive(:owned_or_visible_by_user).with(bob).and_return(StatusMessage)
|
relation = double
|
||||||
expect(StatusMessage).to receive(:tag_stream).with([@tag_id])
|
expect(StatusMessage).to receive(:owned_or_visible_by_user).with(bob).and_return(relation)
|
||||||
|
expect(relation).to receive(:tag_stream).with([@tag_id])
|
||||||
|
|
||||||
StatusMessage.user_tag_stream(bob, [@tag_id])
|
StatusMessage.user_tag_stream(bob, [@tag_id])
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue