mirror of
https://github.com/discourse/discourse.git
synced 2025-06-02 04:08:41 +08:00
added a reverse index of user uploads + rake task
This commit is contained in:
@ -26,6 +26,8 @@ describe Post do
|
||||
it { should have_many :post_replies }
|
||||
it { should have_many :replies }
|
||||
|
||||
it { should have_and_belong_to_many :upload }
|
||||
|
||||
it { should rate_limit }
|
||||
|
||||
let(:topic) { Fabricate(:topic) }
|
||||
|
@ -5,6 +5,8 @@ describe Upload do
|
||||
it { should belong_to :user }
|
||||
it { should belong_to :topic }
|
||||
|
||||
it { should have_and_belong_to_many :post }
|
||||
|
||||
it { should validate_presence_of :original_filename }
|
||||
it { should validate_presence_of :filesize }
|
||||
|
||||
@ -38,7 +40,7 @@ describe Upload do
|
||||
end
|
||||
|
||||
context "s3" do
|
||||
before(:each) do
|
||||
before(:each) do
|
||||
SiteSetting.stubs(:enable_s3_uploads?).returns(true)
|
||||
S3.stubs(:store_file).returns(url)
|
||||
end
|
||||
|
Reference in New Issue
Block a user